forked from qt-creator/qt-creator
ProjectExplorer: Add a IRunConfigurationFactory::addFixedBuildTarget()
To be used for "special" build targets (Custom executables etc) that do not
depend on the project. This reduces user side boiler plate in a couple of
cases and is a bit clearer than the magic {QString()} result anyway.
Change-Id: I105b6ab952981143b2abf9b218fed30cee80b648
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -38,16 +38,7 @@ QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory(QObject *pa
|
||||
registerRunConfiguration<QmlProjectRunConfiguration>(Constants::QML_SCENE_RC_ID);
|
||||
addSupportedProjectType(QmlProjectManager::Constants::QML_PROJECT_ID);
|
||||
setSupportedTargetDeviceTypes({ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE});
|
||||
}
|
||||
|
||||
QList<QString> QmlProjectRunConfigurationFactory::availableBuildTargets(ProjectExplorer::Target *, CreationMode) const
|
||||
{
|
||||
return {QString()};
|
||||
}
|
||||
|
||||
QString QmlProjectRunConfigurationFactory::displayNameForBuildTarget(const QString &) const
|
||||
{
|
||||
return tr("QML Scene");
|
||||
addFixedBuildTarget(tr("QML Scene"));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user