From 3e6bfa242e64b9a3b4e35a3460f2a57f8b79b8f0 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 (cherry picked from commit ba2d4aaa52ff0e508db476537183e67c01f2a8ab) Reviewed-by: Thomas Hartmann --- .../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 3fc4e907055..db3fe3d0a7b 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -210,18 +210,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()) {