summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-04-23 16:06:46 +0200
committerMorten Johan Sørvig <morten.sorvig@digia.com>2014-07-03 09:51:04 +0200
commit4b711fec48c395ab4e486dd1a789309d4d488e9d (patch)
tree744ec3d42ab7ac8441fc67a6bdc23cea0fc7ba2f
parentaa35d132010f4410d72e30d03e3dd713c7a2241d (diff)
downloadqttools-stable.tar.gz
Ignore local and non-filesystem qml imports.stable
Make macdeplpoyqt deploy qml imports from Qml2ImportsPath only. js and local imports should be deployed as a part of the application build. Remote (network) imports should be loaded at run-time. Task-number: QTBUG-38533 Change-Id: I322f588912bcbb65fbc45676faaa3de76d625bef Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--src/macdeployqt/shared/shared.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index 722f1be3a..bf93898b6 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -716,6 +716,24 @@ void deployQmlImports(const QString &appBundlePath, QStringList &qmlDirs)
QJsonObject import = importValue.toObject();
QString name = import["name"].toString();
QString path = import["path"].toString();
+ QString type = import["type"].toString();
+
+ LogNormal() << "Deploying QML import" << name;
+
+ // Skip imports with missing info - path will be empty if the import is not found.
+ if (name.isEmpty() || path.isEmpty()) {
+ LogNormal() << " Skip import: name or path is empty";
+ LogNormal() << "";
+ continue;
+ }
+
+ // Deploy module imports only, skip directory (local/remote) and js imports. These
+ // should be deployed as a part of the application build.
+ if (type != QStringLiteral("module")) {
+ LogNormal() << " Skip non-module import";
+ LogNormal() << "";
+ continue;
+ }
// Create the destination path from the name
// and version (grabbed from the source path)