QmlProjectManager: use qmlpuppet as qmlRunCommand only at host

Change-Id: I7a8e33bdf1007f26e45514abde378ca9b6799c81
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2023-09-22 12:29:40 +02:00
parent cc44c9cd65
commit 2ff09f6e3b

View File

@@ -13,6 +13,7 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/environmentaspect.h> #include <projectexplorer/environmentaspect.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
@@ -213,13 +214,16 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
if (!qmlRuntime.isEmpty()) if (!qmlRuntime.isEmpty())
return qmlRuntime; return qmlRuntime;
} }
auto hasDeployStep = [this]() {
return target()->activeDeployConfiguration() && !target()->activeDeployConfiguration()->stepList()->isEmpty();
};
// The Qt version might know, but we need to make sure // The Qt version might know, but we need to make sure
// that the device can reach it. // that the device can reach it.
if (QtVersion *version = QtKitAspect::qtVersion(kit)) { if (QtVersion *version = QtKitAspect::qtVersion(kit)) {
// look for puppet as qmlruntime only in QtStudio Qt versions // look for puppet as qmlruntime only in QtStudio Qt versions
if (version->features().contains("QtStudio") && if (version->features().contains("QtStudio") &&
version->qtVersion().majorVersion() > 5) { version->qtVersion().majorVersion() > 5 && !hasDeployStep()) {
auto [workingDirectoryPath, puppetPath] = QmlDesigner::QmlPuppetPaths::qmlPuppetPaths( auto [workingDirectoryPath, puppetPath] = QmlDesigner::QmlPuppetPaths::qmlPuppetPaths(
target(), QmlDesigner::QmlDesignerBasePlugin::settings()); target(), QmlDesigner::QmlDesignerBasePlugin::settings());