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

qmlsc: Fill in missing values in warnings about incompatible types

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.10
    • 6.8.4, 6.10.0 Beta3
    • QML: Tooling
    • None

      Using the test code from QTBUG-139727,

      These are the qmllint warnings (Good):

      Warning: D:/TestApp/Main.qml:9:26: Cannot assign binding of type Window to QQuickItem [incompatible-type]
      	property Item itemProp: window // Runtime + qmlsc + qmllint + qmlls warnings
                              	^^^^^^
      

       

      These are the qmlsc 6.10.0b3 warnings (The "from" types are empty):

      Warning: D:/TestApp/Main.qml:9:32: cannot convert from  to QQuickItem [compiler]
      Warning: D:/TestApp/Main.qml:16:21: cannot convert from  to (component in D:/TestApp/Main.qml)::itemProp with type QQuickItem [compiler]
      Warning: D:/TestApp/Main.qml:20:3: Cannot convert from  to QQuickItem [compiler]
      

       

      Note: The qmlsc 6.8.4 warnings have a bit more detail about the type being "stored as QQuickWindowQmlImpl":

      Warning: Main.qml:9:32: Could not compile binding for itemProp: cannot convert from  stored as QQuickWindowQmlImpl to QQuickItem [compiler]
      Warning: Main.qml:16:21: Could not compile function assignItemProp: cannot convert from  stored as QQuickWindowQmlImpl to (component in Main.qml)::itemProp with type QQuickItem [compiler]
      		window.itemProp = window // Runtime + qmlsc warnings only
                        		^^^^^^
      Warning: Main.qml:20:3: Could not compile function assignItemList: Cannot convert from  to QQuickItem [compiler]
      		window.itemList[0] = window // Runtime + qmlsc warnings only
      		^^^^^^
      

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

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes