summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-12-13 11:18:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-13 10:32:51 +0100
commit5f7f4a583fdaf7b2ae1a71d8bdd1a0beb290f1c3 (patch)
treefec659e404f7cbeb13df1bf7236006ff11712953
parent0199b72b8ae6bb2a46118c1f92808f1dca3b9feb (diff)
windeployqt: Concatenate qmlimportscanner results.
Fix up f5b851f83cfb315bbc87ef878bde0b2573f225cf introducing multiple values for the -qmldir option. Change-Id: Ib199105776d42b6eaa81003ed5682b2272a19a53 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
-rw-r--r--src/windeployqt/main.cpp5
-rw-r--r--src/windeployqt/qmlutils.cpp12
-rw-r--r--src/windeployqt/qmlutils.h1
3 files changed, 16 insertions, 2 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index b3b1e9abc..c53ba4881 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -735,9 +735,10 @@ static DeployResult deploy(const Options &options,
foreach (const QString &qmlDirectory, qmlDirectories) {
if (optVerboseLevel >= 1)
std::printf("Scanning %s:\n", qPrintable(QDir::toNativeSeparators(qmlDirectory)));
- qmlScanResult = runQmlImportScanner(qmlDirectory, qmakeVariables.value(QStringLiteral("QT_INSTALL_QML")), options.platform, isDebug, errorMessage);
- if (!qmlScanResult.ok)
+ const QmlImportScanResult scanResult = runQmlImportScanner(qmlDirectory, qmakeVariables.value(QStringLiteral("QT_INSTALL_QML")), options.platform, isDebug, errorMessage);
+ if (!scanResult.ok)
return result;
+ qmlScanResult.append(scanResult);
// Additional dependencies of QML plugins.
foreach (const QString &plugin, qmlScanResult.plugins) {
if (!findDependentQtLibraries(libraryLocation, plugin, options.platform, errorMessage, &dependentQtLibs, &wordSize, &isDebug))
diff --git a/src/windeployqt/qmlutils.cpp b/src/windeployqt/qmlutils.cpp
index 2a41f8ae6..8e16a9526 100644
--- a/src/windeployqt/qmlutils.cpp
+++ b/src/windeployqt/qmlutils.cpp
@@ -128,4 +128,16 @@ QmlImportScanResult runQmlImportScanner(const QString &directory, const QString
return result;
}
+void QmlImportScanResult::append(const QmlImportScanResult &other)
+{
+ foreach (const QString &module, other.modulesDirectories) {
+ if (!modulesDirectories.contains(module))
+ modulesDirectories.append(module);
+ }
+ foreach (const QString &plugin, other.plugins) {
+ if (!plugin.contains(plugin))
+ plugins.append(plugin);
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/windeployqt/qmlutils.h b/src/windeployqt/qmlutils.h
index 0d7c6cc74..ea8c7747d 100644
--- a/src/windeployqt/qmlutils.h
+++ b/src/windeployqt/qmlutils.h
@@ -50,6 +50,7 @@ QString findQmlDirectory(int platform, const QString &startDirectoryName);
struct QmlImportScanResult {
QmlImportScanResult() : ok(false) {}
+ void append(const QmlImportScanResult &other);
bool ok;
QStringList modulesDirectories;