diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-10-10 17:19:09 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-10-11 08:56:00 +0000 |
commit | e0ebda45db814ae52f1661e4a772e1dc1a5321fa (patch) | |
tree | 47590d6015a69cce093fa066645cae68f47b2067 | |
parent | 4b76f6c65db79cdecaff1069bdc3826a59852299 (diff) |
QbsPM: Fix look-up of executable on Desktop
... if installation at build time is disabled and a dedicated install
step exists.
Fixes: QTCREATORBUG-23039
Change-Id: I7115368bb1993ebdb48200d2a9c55c34a7bdceec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsproject.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 209e87b4bc..ca70e12444 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -27,6 +27,7 @@ #include "qbsbuildconfiguration.h" #include "qbsbuildstep.h" +#include "qbsinstallstep.h" #include "qbslogsink.h" #include "qbspmlogging.h" #include "qbsprojectimporter.h" @@ -50,6 +51,7 @@ #include <projectexplorer/buildinfo.h> #include <projectexplorer/buildmanager.h> #include <projectexplorer/buildtargetinfo.h> +#include <projectexplorer/deployconfiguration.h> #include <projectexplorer/deploymentdata.h> #include <projectexplorer/kit.h> #include <projectexplorer/kitinformation.h> @@ -488,6 +490,14 @@ FilePath QbsProject::installRoot() { if (!activeTarget()) return FilePath(); + const auto dc = activeTarget()->activeDeployConfiguration(); + if (dc) { + const QList<QbsInstallStep *> qbsInstallSteps = dc->stepList()->allOfType<QbsInstallStep>(); + for (QbsInstallStep * const step : qbsInstallSteps) { + if (step->enabled()) + return FilePath::fromString(step->installRoot()); + } + } const auto * const bc = qobject_cast<QbsBuildConfiguration *>(activeTarget()->activeBuildConfiguration()); if (!bc) |