summaryrefslogtreecommitdiff
path: root/src/macdeployqt/shared/shared.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-12 10:32:29 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-13 09:04:01 +0000
commitf14366819d1745b54c90a86ba8b0fdbd6dd246e1 (patch)
tree55552a46b9c194421b55fa43e292d275b5390597 /src/macdeployqt/shared/shared.cpp
parent7a3718b02ca782c25ccc9de5c92664fccd6907bf (diff)
downloadqttools-f14366819d1745b54c90a86ba8b0fdbd6dd246e1.tar.gz
macdeployqt: halt on missing qmlimportscanner
This is going to produce a broken bundle; stop and print the error. Change-Id: Ie58d357b97adc229393d80e9dde5e10c65c9bc99 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r--src/macdeployqt/shared/shared.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index 2328ad5df..0cc596320 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1073,7 +1073,7 @@ void deployQmlImport(const QString &appBundlePath, const QSet<QString> &rpaths,
}
// Scan qml files in qmldirs for import statements, deploy used imports from Qml2ImportsPath to Contents/Resources/qml.
-void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs)
+bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs)
{
LogNormal() << "";
LogNormal() << "Deploying QML imports ";
@@ -1084,7 +1084,7 @@ void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
if (!QFile(qmlImportScannerPath).exists()) {
LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
LogError() << "Rebuild qtdeclarative/tools/qmlimportscanner";
- return;
+ return false;
}
// build argument list for qmlimportsanner: "-rootPath foo/ -rootPath bar/ -importPath path/to/qt/qml"
@@ -1103,7 +1103,7 @@ void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
qmlImportScanner.start(qmlImportScannerPath, argumentList);
if (!qmlImportScanner.waitForStarted()) {
LogError() << "Could not start qmlimpoortscanner. Process error is" << qmlImportScanner.errorString();
- return;
+ return false;
}
qmlImportScanner.waitForFinished();
@@ -1122,7 +1122,7 @@ void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
if (!doc.isArray()) {
LogError() << "qmlimportscanner output error. Expected json array, got:";
LogError() << json;
- return;
+ return false;
}
bool qtQuickContolsInUse = false; // condition for QtQuick.PrivateWidgets below
@@ -1184,6 +1184,7 @@ void deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
deployQmlImport(appBundlePath, deploymentInfo.rpathsUsed, path, name);
LogNormal() << "";
}
+ return true;
}
void changeQtFrameworks(const QList<FrameworkInfo> frameworks, const QStringList &binaryPaths, const QString &absoluteQtPath)