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

[REG 5.7.0 -> 5.7.1] Built-in methods of QML properties broken in Qt 5.7.1 (when using GCC with -O2)

    XMLWordPrintable

Details

    • 2a992040e2ef3f9dab087be3bfac05e28596672b

    Description

      In Debian, the users have reported that Qt 5.7.1 update breaks Plasma: https://bugs.debian.org/843250

      While investigating that bug, I was able to write a small enough test case:

      MyLabel.qml
      import QtQuick 2.0
      
      Text {
          property var someText
          text: "Hello, " + someText.text
      
          Component.onCompleted: {
              console.log(someText);
              console.log(someText.hasOwnProperty);
          }
      }
      
      main.qml
      import QtQuick 2.0
      
      MyLabel {
          someText: Text { text: "world!" }
      }
      

      With Qt 5.7.1, I get this output:

      $ qml ./main.qml
      qml: QQuickText(0x556bfb6ed290)
      qml: undefined
      

      So hasOwnProperty method is unavailable. The same goes for any other built-in method, like isPrototypeOf, constructor and so on.

      In Qt 5.6.1 (and 5.7.0), it worked fine:

      $ qml ./test.qml 
      qml: QQuickText(0x5592b042cf30)
      qml: function() { [code] }
      

      Attachments

        Issue Links

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

          Activity

            People

              erikv Erik Verbruggen
              mandriver Dmitry Shachnev
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes