forked from qt-creator/qt-creator
ProjectExplorer: Simplify IRunConfigurationFactory::clone() use
Change-Id: I005d6c87142d26dfc7ae1349329737a68f54c427 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -213,7 +213,10 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
|
||||
// Factory
|
||||
CMakeRunConfigurationFactory::CMakeRunConfigurationFactory(QObject *parent) :
|
||||
IRunConfigurationFactory(parent)
|
||||
{ setObjectName(QLatin1String("CMakeRunConfigurationFactory")); }
|
||||
{
|
||||
setObjectName("CMakeRunConfigurationFactory");
|
||||
registerRunConfiguration<CMakeRunConfiguration>();
|
||||
}
|
||||
|
||||
// used to show the list of possible additons to a project, returns a list of ids
|
||||
QList<Core::Id> CMakeRunConfigurationFactory::availableCreationIds(Target *parent, CreationMode mode) const
|
||||
@@ -264,13 +267,6 @@ bool CMakeRunConfigurationFactory::canClone(Target *parent, RunConfiguration *so
|
||||
return source->id().name().startsWith(CMAKE_RC_PREFIX);
|
||||
}
|
||||
|
||||
RunConfiguration *CMakeRunConfigurationFactory::clone(Target *parent, RunConfiguration * source)
|
||||
{
|
||||
if (!canClone(parent, source))
|
||||
return 0;
|
||||
return cloneHelper<CMakeRunConfiguration>(parent, source);
|
||||
}
|
||||
|
||||
bool CMakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
|
||||
{
|
||||
if (!qobject_cast<CMakeProject *>(parent->project()))
|
||||
|
||||
Reference in New Issue
Block a user