aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-04-27 14:27:57 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-04-28 14:15:14 +0000
commit598044110a5ccdfc18c593644c2ce8de838212e3 (patch)
treeb4406081fb618dee7a624241a9109aaee1657196
parentb4aa71223c18599302d600b079e20fc0fb51009a (diff)
API: Catch error from ProductInstaller
... and emit a warning. This is for the resolve context. On actual installation, a proper error will still be thrown. Task-number: QBS-1122 Change-Id: I7d2e59ebcb18bc49ce0d3cf670fd64d4b5e171fd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/api/project.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp
index 1508c34e9..628ccb20c 100644
--- a/src/lib/corelib/api/project.cpp
+++ b/src/lib/corelib/api/project.cpp
@@ -304,12 +304,17 @@ void ProjectPrivate::setupInstallData(ArtifactData &artifact,
QLatin1String("qbs"), QLatin1String("installRoot")).toString();
InstallOptions options;
options.setInstallRoot(installRoot);
- QString installFilePath = ProductInstaller::targetFilePath(product->topLevelProject(),
- product->sourceDirectory, artifact.filePath(), artifact.properties().d->m_map, options);
- if (!installRoot.isEmpty())
- installFilePath.remove(0, installRoot.count());
artifact.d->installData.d->installRoot = installRoot;
- artifact.d->installData.d->installFilePath = installFilePath;
+ try {
+ QString installFilePath = ProductInstaller::targetFilePath(product->topLevelProject(),
+ product->sourceDirectory, artifact.filePath(), artifact.properties().d->m_map,
+ options);
+ if (!installRoot.isEmpty())
+ installFilePath.remove(0, installRoot.count());
+ artifact.d->installData.d->installFilePath = installFilePath;
+ } catch (const ErrorInfo &e) {
+ logger.printWarning(e);
+ }
}
#ifdef QBS_ENABLE_PROJECT_FILE_UPDATES