summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-10-27 15:54:42 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-10-28 15:46:24 +0100
commit53261d90fc89a11fb44873b5bbee7836e830d568 (patch)
tree2a9f94e25f536b9271985044b6b6e8edc9623615
parent05fd050598c43cb4f06b6b40f987c2fbd34defc2 (diff)
downloadqttools-53261d90fc89a11fb44873b5bbee7836e830d568.tar.gz
androiddeployqt: Fix dependency order for XML dependencies
Although this bug was there in Qt 5.3 as well, something has changed in our build system that causes readelf to return libraries in a different order than before. In particular, the QtMultimedia dependency is now listed before QtQuick if it's listed first in the QT variable in the .pro file. This caused the following bug: When we read the manual dependencies from the XML specification, then we assume the dependencies of these are already met (otherwise they should not be added). Therefore, we need to load these dependencies last, not intermingled with the actual direct dependencies of the application. What would happen is that Qt5Multimedia came before Qt5Quick, and triggered adding Qt5MultimediaQuick_p before Qt5Quick. This of course depends on Qt5Quick so it needs to be added after it (which is why it is only added if the application itself depends on Qt Quick). Change-Id: Ifa97d85645cff49ebf65d4ce3fc2101506346695 Task-number: QTBUG-42012 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
-rw-r--r--src/androiddeployqt/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index 3696038f8..30dc89a11 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -1603,6 +1603,7 @@ bool readDependenciesFromElf(Options *options,
fprintf(stdout, " %s\n", qPrintable(dep));
}
// Recursively add dependencies from ELF and supplementary XML information
+ QList<QString> dependenciesToCheck;
foreach (QString dependency, dependencies) {
if (usedDependencies->contains(dependency))
continue;
@@ -1619,12 +1620,17 @@ bool readDependenciesFromElf(Options *options,
options->qtDependencies.append(QtDependency(dependency, absoluteDependencyPath));
if (options->verbose)
fprintf(stdout, "Appending dependency: %s\n", qPrintable(dependency));
+ dependenciesToCheck.append(dependency);
+ }
+
+ foreach (QString dependency, dependenciesToCheck) {
QString qtBaseName = dependency.mid(sizeof("lib/lib") - 1);
qtBaseName = qtBaseName.left(qtBaseName.size() - (sizeof(".so") - 1));
if (!readAndroidDependencyXml(options, qtBaseName, usedDependencies, remainingDependencies)) {
return false;
}
}
+
return true;
}