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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.11.1
    • 5.11
    • QML: Compiler
    • None
    • Qt 5.11, MSVC 2017 self-built (x86) and rc binary package (x86_64)
    • 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

              shausman Simon Hausmann
              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