Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-852

Enable Qt Quick Compiler no longer generates a proper qmlcache_loader.cpp in 15.0 (works in 14.2)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 2.6.0 (rev.07)
    • Build-time integration
    • None
    • Windows

    Description

      It's not clear to me if this is an issue with the VS tools specifically, but the net result is that the "Enable Qt Quick Compiler" option no longer works properly in Qt 5.15.0.

      What I've tracked this down to is that the following line is no longer being generated into qmlcache_loader.cpp (and the corresponding definitions for the arguments):

      QT_PREPEND_NAMESPACE(qRegisterResourceData)(/*version*/0x01, qt_resource_tree, qt_resource_names, qt_resource_empty_payout);

       
      Because of the registration not being called, when the application is run your compiled QML types will not be found.  The error message(s) will be of the form:
      qrc:/main.qml:10:5: MyCustomQml is not a type
       
      I've attached versions of the 5.15.0 (broken) and 5.14.2 (working) qmlcache_loader.cpp files and a minimal (broken) VS2019 project (set up for 5.15.0).  Paths will likely need to be adjusted in the project in order to repro locally.  It's also using an older Qt project format, but the problem exists even when upgrading to the latest format.  I've reproduced it with both the msvc2015_x64 (5.15.0) and msvc2019_x64 (5.15.0 and 5.15.2) bins.

      Attachments

        Issue Links

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

          Activity

            People

              qtvstools Qt VS Tools
              xanen Joshua Wexler
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes