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

qmlimportscanner fails to process imports on resource files included in .pri's

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • fbc463e84d5cc6012953140c93f6b18f78e66bf8 (qt/qtdeclarative/5.15)

    Description

      On a complex Qt/Qml project which have several .pri to make possible to reutilize components across different projects located in different directories, qml files located on those .pri resources are not scanned by qmlimportscanner. This leads to Qt not being able to find some modules during execution.
      The workaround consists in declaring a resource file on the project dir with a dummy qml file including the necessary imports. This is confirmed to happen in Qt iOS.

      Other users suggest:

      "I would suggest to add a new variable called "QML_SCAN_PATH" for qmake. And let's qmlimportscanner scan those directory too. Moreover, due to QTBUG-48480, it may also need a variable QML_EXCLUDE_SCAN_PATH too."

      "There’s already QML_IMPORT_PATH that is only used by Qt Creator for resolving imports. Perhaps the same variable could be used for qmlimportscanner..." (J-P Nurmi)

      Attachments

        Issue Links

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

          Activity

            People

              andysh Andy Shaw
              sinosoidal Nuno Santos
              Votes:
              7 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes