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

assert when calling a property as function

    XMLWordPrintable

Details

    Description

      If one accidentally calls a property as a function, the following assert is triggered:

      ASSERT: "isObject()" in file /home/blubb/dev/qt/5.6/qtdeclarative/src/qml/jsruntime/qv4value.cpp, line 150
      

      Example:

      import QtQuick 2.4
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          MouseArea {
              id: mouseArea
              anchors.fill: parent
              onClicked: {
                  if (!containsMouse())    // this should read (containsMouse) instead!
                      console.log("impossible!");
                  Qt.quit();
              }
          }
      }
      

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes