Look for dependency XML files in all prefix paths

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply 07bc7c02 in qttools here.

Change-Id: I13a77a0c8567d07c4aa6369ed76bdb894b88f86f
Reviewed-by: Volker Krause <volker.krause@kdab.com>
bb10
Volker Krause 2018-03-09 11:21:27 +01:00 committed by Liang Qi
parent 413ca86c29
commit 86bea797dc
1 changed files with 7 additions and 2 deletions

View File

@ -1426,6 +1426,11 @@ QList<QtDependency> findFilesRecursively(const Options &options, const QFileInfo
QList<QtDependency> findFilesRecursively(const Options &options, const QString &fileName)
{
for (const auto &prefix : options.extraPrefixDirs) {
QFileInfo info(prefix + QLatin1Char('/') + fileName);
if (info.exists())
return findFilesRecursively(options, info, prefix + QLatin1Char('/'));
}
QFileInfo info(options.qtInstallDirectory + QLatin1Char('/') + fileName);
return findFilesRecursively(options, info, options.qtInstallDirectory + QLatin1Char('/'));
}
@ -1435,7 +1440,7 @@ bool readAndroidDependencyXml(Options *options,
QSet<QString> *usedDependencies,
QSet<QString> *remainingDependencies)
{
QString androidDependencyName = options->qtInstallDirectory + QString::fromLatin1("/lib/%1-android-dependencies.xml").arg(moduleName);
QString androidDependencyName = absoluteFilePath(options, QString::fromLatin1("/lib/%1-android-dependencies.xml").arg(moduleName));
QFile androidDependencyFile(androidDependencyName);
if (androidDependencyFile.exists()) {
@ -1480,7 +1485,7 @@ bool readAndroidDependencyXml(Options *options,
int bundling = reader.attributes().value(QLatin1String("bundling")).toInt();
QString fileName = reader.attributes().value(QLatin1String("file")).toString();
if (bundling == (options->deploymentMechanism == Options::Bundled)) {
QtDependency dependency(fileName, options->qtInstallDirectory + QLatin1Char('/') + fileName);
QtDependency dependency(fileName, absoluteFilePath(options, fileName));
if (!usedDependencies->contains(dependency.absolutePath)) {
options->qtDependencies.append(dependency);
usedDependencies->insert(dependency.absolutePath);