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:
@@ -375,7 +375,7 @@ Tasks QmlProject::projectIssues(const Kit *k) const
|
||||
if (version->type() == QtSupport::Constants::DESKTOPQT) {
|
||||
if (version->qmlsceneCommand().isEmpty()) {
|
||||
result.append(createProjectTask(Task::TaskType::Error,
|
||||
tr("Qt version has no qmlscene command.")));
|
||||
tr("Qt version has no QML utility.")));
|
||||
}
|
||||
} else {
|
||||
// Non-desktop Qt on a desktop device? We don't support that.
|
||||
@@ -383,8 +383,8 @@ Tasks QmlProject::projectIssues(const Kit *k) const
|
||||
tr("Non-desktop Qt is used with a desktop device.")));
|
||||
}
|
||||
} else {
|
||||
// If not a desktop device, don't check the Qt version for qmlscene.
|
||||
// The device is responsible for providing it and we assume qmlscene can be found
|
||||
// If not a desktop device, don't check the Qt version for qml runtime binary.
|
||||
// The device is responsible for providing it and we assume qml runtime can be found
|
||||
// in $PATH if it's not explicitly given.
|
||||
}
|
||||
|
||||
|
||||
@@ -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