From ba2d4aaa52ff0e508db476537183e67c01f2a8ab Mon Sep 17 00:00:00 2001 From: Andrii Semkiv Date: Mon, 17 Mar 2025 10:42:34 +0100 Subject: [PATCH] QML Project Manager: fix host detection Assuming that a kit that has deploy steps is not meant for running on the host is not always correct. When working with Qt for MCU for live previews there is an essentially ordinary desktop kit with a QML exporter set to run as a deploy step. We used to wrongly treat this as a remote setup, selecting the standard QML runtime instead of QML puppet. It caused caused fonts to be rendered incorrectly in Live Preview. Amends: 8e0e097f559abd5322be674763b3baa29080c818 Fixes: QDS-14901 Change-Id: Iace1943bf888274fc47680a2bd8b1d787f665620 Reviewed-by: hjk --- .../qmlprojectmanager/qmlprojectrunconfiguration.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 390499e569c..71284db9e32 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -211,18 +211,13 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const if (!qmlRuntime.isEmpty()) return qmlRuntime; } - auto hasDeployStep = [this] { - return target()->activeDeployConfiguration() && - !target()->activeDeployConfiguration()->stepList()->isEmpty(); - }; // The Qt version might know, but we need to make sure // that the device can reach it. if (QtVersion *version = QtKitAspect::qtVersion(kit)) { // look for QML Puppet as qmlruntime only in QtStudio Qt versions - if (version->features().contains("QtStudio") && - version->qtVersion().majorVersion() > 5 && !hasDeployStep()) { - + if (version->features().contains("QtStudio") && version->qtVersion().majorVersion() > 5 + && dev->rootPath().isLocal()) { auto [workingDirectoryPath, puppetPath] = QmlDesigner::QmlPuppetPaths::qmlPuppetPaths( target(), QmlDesigner::QmlDesignerBasePlugin::settings()); if (!puppetPath.isEmpty()) {