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

generateJavaQmlComponents will scan relevant import directories twice

    XMLWordPrintable

Details

    • Android
    • 3bf9047a3 (dev), 44913432c (6.10), e92a7fc93 (6.9), 3329a206b (tqtc/lts-6.8)

    Description

      getImportPaths will scan the {component_name}_conf.rsp file to get import paths. The content of the file will be something like this:

      -rootPath
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview
      -cmake-output
      -output-file
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview/.qt/qml_imports/qtquickview_conf.cmake
      -importPath
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview/qmlModule
      -importPath
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview
      -importPath
      /Users/ollivuolteenaho/dev/qt69/qt5-build-android/qtbase/qml
      -qrcFiles
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview/.qt/rcc/qmake_qmlModule.qrc
      /Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview/.qt/rcc/qtquickview_raw_qml_0.qrc
      

      Based on this it will populate appImports with the paths that start with the buildPath, in this case "/Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview/qmlModule" and "/Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview".

      But with https://codereview.qt-project.org/c/qt/qtbase/+/602864 we will also scan these paths for inner qmlmodules based on the qmldir file. This is fine for the first listed item, but for the second one it will rescan the same directories so all found paths will be added twice. Also, because .../qt_generated/qtquickview/qmlModule has a qmldir file even that will be added again. Therefore appImports will have at least .../qt_generated/qtquickview/qmlModule, .../qt_generated/qtquickview and ...qt_generated/qtquickview/qmlModule, and the scan will take twice as long.

      Attachments

        Issue Links

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

          Activity

            People

              olvuolte Olli Vuolteenaho
              olvuolte Olli Vuolteenaho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes