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

androiddeployqt skips QtGraphicalEffects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.11
    • None
    • Android, Windows
    • 2022wk50FOQtforAndroid

    Description

      QtGraphicalEffects doesn't get bundled by androiddeployqt:

        -- Adding 'C:/Qt/5.15.11/android/qml/QtGraphicalEffects' as QML dependency
      Reading dependencies from C:/Qt/5.15.11/android/qml/QtGraphicalEffects/libqml_QtGraphicalEffects_qtgraphicaleffectsplugin_arm64-v8a.so
            lib/libQt5Core_arm64-v8a.so
            lib/libQt5Gui_arm64-v8a.so
            lib/libQt5Network_arm64-v8a.so
            lib/libQt5QmlModels_arm64-v8a.so
            lib/libQt5Qml_arm64-v8a.so
            lib/libQt5Quick_arm64-v8a.so
      Reading dependencies from C:/Qt/5.15.11/android/qml/QtGraphicalEffects/private/libqml_QtGraphicalEffects_private_qtgraphicaleffectsprivate_arm64-v8a.so
            lib/libQt5Core_arm64-v8a.so
            lib/libQt5Gui_arm64-v8a.so
            lib/libQt5Network_arm64-v8a.so
            lib/libQt5QmlModels_arm64-v8a.so
            lib/libQt5Qml_arm64-v8a.so
            lib/libQt5Quick_arm64-v8a.so
          -- Skipping because the required qml files are missing.
      

      Adding debug output to androiddeployqt reveals:

          -- C:/Qt/5.15.11/android/qml/QtGraphicalEffects: Not found: C:/Qt/5.15.11/android/qml/QtGraphicalEffects/Blend.qml
      

      Just that `C:/Qt/5.15.11/android/qml/QtGraphicalEffects/Blend.qml` exists. The issue seems to be, that qmlimportscanner adds linebreaks to some filenames in its JSON output:

          {
              "classname": "QtGraphicalEffectsPlugin",
              "components": [
                  "C:/Qt/5.15.11/android/qml/QtGraphicalEffects/Blend.qml\n",
                  "C:/Qt/5.15.11/android/qml/QtGraphicalEffects/BrightnessContrast.qml\n",
                  "C:/Qt/5.15.11/android/qml/QtGraphicalEffects/Colorize.qml\n",
                  "C:/Qt/5.15.11/android/qml/QtGraphicalEffects/ColorOverlay.qml\n",
      

      Teaching androiddeployqt to remove the linebreak makes it bundle QtGraphicalEffects:

      diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
      index bb4cf2e..59050e8 100644
      --- a/src/tools/androiddeployqt/main.cpp
      +++ b/src/tools/androiddeployqt/main.cpp
      @@ -1894,7 +1894,7 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
                   qmlFiles.append(object.value(QLatin1String("scripts")).toArray().toVariantList());
                   bool qmlFilesMissing = false;
                   for (const auto &qmlFileEntry : qmlFiles) {
      -                QFileInfo fileInfo(qmlFileEntry.toString());
      +                QFileInfo fileInfo(qmlFileEntry.toString().trimmed());
                       if (!fileInfo.exists()) {
                           qmlFilesMissing = true;
                           break;
      

      Maybe that's the correct fix. Maybe qmlimportscanner should be fixed to not produce this linebreak.

      Attachments

        Issue Links

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

          Activity

            People

              qtandroidteam Qt Android Team
              hasselmann_via_meiller Mathias Hasselmann
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes