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

.pragma library does not have any effect when using qmlcachegen (CONFIG+=qtquickcompiler)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.11
    • Fix Version/s: 5.11.1
    • Component/s: QML: Compiler
    • Labels:
      None
    • Environment:
      Qt 5.11, MSVC 2017 self-built (x86) and rc binary package (x86_64)
    • Commits:
      0a2aaee61cfc2888bc71f54ac5b165d248cbf5e8

      Description

      .pragma library ensures that different qml documents can access the same data in a .js document. This does not see to work when using qmlcachegen (via CONFIG+=qtquickcompiler) of Qt 5.11.
      The attached application generates the following correct output when not using qmlcache:

      qml: A.qml set the string: Foo
      qml: B.qml appended a string: FooBar
      qml: main.qml read the result: FooBar

      When building with qmlcache, the output looks like this:

      qml: A.qml set the string: Foo
      qml: B.qml appended a string: undefinedBar
      qml: main.qml read the result: undefined

      This issue resembles QTBUG-42102 (where the attachment comes from) showed similar symptoms with the original qtquickcompiler. The difference is, that QTBUG-42102 can be solved by using the right path prefix (qrc:/ vs. qrc://). In this case here, I did not find a solution, yet.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                shausman Simon Hausmann
                Reporter:
                portale Alessandro Portale
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes