From d25438ebbd62cd10a435f6d7dd6a7ce181e3ac5f Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Wed, 4 Oct 2023 17:37:28 +0200 Subject: [PATCH] Search extra library paths for Android dependency XML files as well This fixes a regression compared to Qt5. In Qt5 absoluteFilePath() unconditionally searched for all files in extra prefix dirs and the Qt install prefix, in particular also the -android-dependencies.xml files. After the changes in Qt6 up to now however those files are only searched in the Qt install prefix. This broke external libraries also making use of the -android-dependencies.xml mechanism, such as some KDE frameworks. Pick-to: 6.5 6.6 Change-Id: Ic53aab50c70f853f3b1d621d6de6edb3df223905 Reviewed-by: Assam Boudjelthia --- src/tools/androiddeployqt/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index a607131716d..3af25021ffb 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -1808,6 +1808,11 @@ static QString absoluteFilePath(const Options *options, const QString &relativeF } if (relativeFileName.endsWith("-android-dependencies.xml"_L1)) { + for (const auto &dir : options->extraLibraryDirs) { + const QString path = dir + u'/' + relativeFileName; + if (QFile::exists(path)) + return path; + } return options->qtInstallDirectory + u'/' + options->qtLibsDirectory + u'/' + relativeFileName; }