forked from qt-creator/qt-creator
use "qml" as QML runtime
Since Qt 6.2 qmlscene is deprecated by Qt. This patch also removes QMLViewer as a last QtQuick 1 artifact in external tools. Task-number: QDS-639 Task-number: QDS-4535 Task-number: QTCREATORBUG-22385 Change-Id: I5f67040954f8ef438961f7166a53bd96d5b73f4d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -141,7 +141,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
||||
r.workingDirectory = bs->targetDirectory().toString();
|
||||
});
|
||||
|
||||
setDisplayName(tr("QML Scene", "QMLRunConfiguration display name."));
|
||||
setDisplayName(tr("QML Utility", "QMLRunConfiguration display name."));
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -154,10 +154,10 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
||||
if (DeviceTypeKitAspect::deviceTypeId(kit())
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
|
||||
&& !viewer.exists()) {
|
||||
return tr("No qmlscene found.");
|
||||
return tr("No QML utility found.");
|
||||
}
|
||||
if (viewer.isEmpty())
|
||||
return tr("No qmlscene binary specified for target device.");
|
||||
return tr("No QML utility specified for target device.");
|
||||
return RunConfiguration::disabledReason();
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const
|
||||
|
||||
Kit *kit = target()->kit();
|
||||
BaseQtVersion *version = QtKitAspect::qtVersion(kit);
|
||||
if (!version) // No Qt version in Kit. Don't try to run qmlscene.
|
||||
if (!version) // No Qt version in Kit. Don't try to run QML runtime.
|
||||
return {};
|
||||
|
||||
const Id deviceType = DeviceTypeKitAspect::deviceTypeId(kit);
|
||||
@@ -180,10 +180,10 @@ FilePath QmlProjectRunConfiguration::qmlScenePath() const
|
||||
}
|
||||
|
||||
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
|
||||
if (dev.isNull()) // No device set. We don't know where to run qmlscene.
|
||||
if (dev.isNull()) // No device set. We don't know where a QML utility is.
|
||||
return {};
|
||||
|
||||
const QString qmlscene = dev->qmlsceneCommand();
|
||||
const QString qmlscene = dev->qmlRunCommand();
|
||||
// If not given explicitly by device, try to pick it from $PATH.
|
||||
return FilePath::fromString(qmlscene.isEmpty() ? QString("qmlscene") : qmlscene);
|
||||
}
|
||||
@@ -237,10 +237,10 @@ QString QmlProjectRunConfiguration::mainScript() const
|
||||
// QmlProjectRunConfigurationFactory
|
||||
|
||||
QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory()
|
||||
: FixedRunConfigurationFactory(QmlProjectRunConfiguration::tr("QML Scene"), false)
|
||||
: FixedRunConfigurationFactory(QmlProjectRunConfiguration::tr("QML Runtime"), false)
|
||||
{
|
||||
registerRunConfiguration<QmlProjectRunConfiguration>
|
||||
("QmlProjectManager.QmlRunConfiguration.QmlScene");
|
||||
("QmlProjectManager.QmlRunConfiguration.Qml");
|
||||
addSupportedProjectType(QmlProjectManager::Constants::QML_PROJECT_ID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user