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

QML comma operator property lookup failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.11.1
    • Fix Version/s: 5.11.3, 5.12.0 Beta 1
    • Labels:
      None
    • Environment:
      Qt 5.11.1 on embedded ARMv71 device. Works correctly on Qt 5.9.3 on same device.
    • Platform/s:
      Linux/X11
    • Commits:
      074190902a96c550d9aeb55ead19c0697ce1cbc3

      Description

      The following test case fails to update as expected.  Either of the commented-out variants for the binding of property 'active' work as expected.

       

      import QtQuick 2.7
      import QtQuick.Window 2.2
      
      Window {
        id: root
      
        property var testObject: ({ 'prop': true })
      
        width: 400
        height: 200
      
        Item {
          id: innerItem
      
          property int counter
          //property bool active: innerItem.counter, testObject.prop	            // works
          //property bool active: counter !== undefined ? testObject.prop : false // works
          property bool active: counter, testObject.prop
      
          anchors.fill: parent
      
          Timer {
            id: timer
            interval: 1000
            running: true
            repeat: true
            onTriggered: {
              testObject.prop = !testObject.prop
              ++innerItem.counter
            }
          }
      
          Text {
            anchors.centerIn: parent
            text: innerItem.active
          }
        }
      }
      
      

        Attachments

        For Gerrit Dashboard: QTBUG-69973
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            erikv Erik Verbruggen
            Reporter:
            mvogt2 Matthew Vogt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes