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

Error messages give no "backtrace" from components to instances.

XMLWordPrintable

      Given:

      Foo.qml
      Text {
          property variant a
          text: a.text
      }
      
      Bar.qml
      Text { text: "bar" }
      

      This code has an error that Foo::a is expected to be an object, yet 25 is being assigned:

      Test.qml
      import Qt 4.7
      Row {
          Foo { a: 25 } // Actual mistake is here
          Foo { a: Bar { } } // Mistake is not here
      }
      

      However, the error produced is relative to Foo.qml, not Test.qml (where the error occurs):

      Foo.qml:5: Unable to assign [undefined] to QString text
      

      Would it be possible to give a "back trace" in such cases:

      In Foo instantiated at Test.qml:3:
      Foo.qml:5: Unable to assign [undefined] to QString text
      

      (in the example, changing the property to QtObject is sufficient in this case, but that's not always possible)

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

            aakenned Aaron Kennedy
            wallison Warwick Allison (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes