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

App using QRC but not qtquickcompiler loads stale .qmlc files from cache

    XMLWordPrintable

Details

    • Linux/X11

    Description

      In a project using QRC (with QML files in it) but without qtquickcompiler, modifying a QML file on disk and rebuilding has no apparent effect, because the application loads a stale .qmlc file from the cache at startup every time. When building with qtquickcompiler, or if using file:/ instead, there is no problem.

      Repro:
      tar -xzf QmlStaleCacheRepro.tar.gz
      cd QmlStaleCacheRepro
      qmake CONFIG-=qtquickcompiler
      make
      ./Blah # observe that it outputs 4
      (edit Blah.qml to print a different number)
      make
      ./Blah # it still outputs 4

      When running the program under strace (which is how I discovered that such a thing as a "QML cache" exists at all), it prints the following:

      [pid 14611] openat(AT_FDCWD, ":/Blah.qmlc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
      [pid 14611] openat(AT_FDCWD, "/home/glaebhoerl/.cache/Blah/qmlcache/439d39ea22727ec95950566b9a0ad8856cfdc5a5.qmlc", O_RDONLY|O_CLOEXEC) = 8

      Apparently it is expecting to find the .qmlc file within QRC, and seemingly also treating the QRC path as a normal filesystem path.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            glaebhoerl Gábor Lehel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes