qmlprojectmanager: fix Cannot run Qt5 projects

qml2puppet only enables the qmlruntime feature if it
was built against a Qt 6.

Task-number: QDS-9088
Change-Id: If573cae305ef18c11101a591e6c1e38f133b7914
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2023-02-08 13:28:53 +01:00
parent 5ac46d46ba
commit f766c2f5dc

View File

@@ -190,12 +190,14 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
// If not given explicitly by Qt Version, try to pick it from $PATH. // If not given explicitly by Qt Version, try to pick it from $PATH.
const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT; const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT;
if (version->qtVersion().majorVersion() > 5) {
auto [workingDirectoryPath, puppetPath] = QmlDesigner::QmlPuppetPaths::qmlPuppetPaths( auto [workingDirectoryPath, puppetPath] = QmlDesigner::QmlPuppetPaths::qmlPuppetPaths(
target(), QmlDesigner::QmlDesignerBasePlugin::settings()); target(), QmlDesigner::QmlDesignerBasePlugin::settings());
if (!puppetPath.isEmpty()) { if (!puppetPath.isEmpty()) {
usePuppetAsQmlRuntime = true; usePuppetAsQmlRuntime = true;
return puppetPath; return puppetPath;
} }
}
return isDesktop ? version->qmlRuntimeFilePath() : "qmlscene"; return isDesktop ? version->qmlRuntimeFilePath() : "qmlscene";
} }