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

qmlsc complains about value type, but it seems to work?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.8
    • 6.7.0
    • QML: Compiler
    • None

      Sorry for the example containing more stuff than in this issue. The part in question is in "function test6()", where I'm not sure if I'm using it the right way:

                  function test6() {
                      let foo = 42 as PC.appValueType
                      console.log(foo)
                  }
      

      The compiler says:

      Warning: Main.qml:100:36: Type not found in namespace [unresolved-type]
                      let foo = 42 as PC.appValueType
                                         ^^^^^^^^^^^^
      Warning: Main.qml:100:36: Member "appValueType" not found on type "undefined" [missing-property]
                      let foo = 42 as PC.appValueType
                                         ^^^^^^^^^^^^
      Warning: Main.qml:100:36: Could not compile function test6: Cannot load property appValueType from import namespace 4. [compiler]
                      let foo = 42 as PC.appValueType
                                         ^^^^^^^^^^^^
      

      while the apps runtime output says

      qml: ValueType(42)
      

      which seems OK.

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

            diseraluca Luca Di Sera
            cajus Cajus Pollmeier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes