Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-22411

QML Optimizer causes boolean property to be inverted

    XMLWordPrintable

Details

    Description

      With QML_DISABLE_OPTIMIZER enabled this code works just as expected:

      property bool canCopy: editor && editor.selectedText != "" && (editor.echoMode == null || editor.echoMode == TextInput.Normal)
      property bool canCut: internal.canCopy && !editor.readOnly
      

      But with QML_DISABLE_OPTIMIZER disabled (the default) the last half of the
      second line somehow permanently inverts the value of the property in the
      first half of that expression. E.g. "&& !editor.readOnly" inverts the value
      assigned to the canCopy property.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aakenned Aaron Kennedy
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes