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:
@@ -278,6 +278,7 @@ public:
|
||||
PythonRunConfigurationFactory()
|
||||
{
|
||||
setObjectName("PythonRunConfigurationFactory");
|
||||
registerRunConfiguration<PythonRunConfiguration>();
|
||||
}
|
||||
|
||||
QList<Core::Id> availableCreationIds(Target *parent, CreationMode mode) const override
|
||||
@@ -323,13 +324,6 @@ public:
|
||||
return source->id().name().startsWith(PythonRunConfigurationPrefix);
|
||||
}
|
||||
|
||||
RunConfiguration *clone(Target *parent, RunConfiguration *source) override
|
||||
{
|
||||
if (!canClone(parent, source))
|
||||
return 0;
|
||||
return cloneHelper<PythonRunConfiguration>(parent, source);
|
||||
}
|
||||
|
||||
private:
|
||||
bool canHandle(Target *parent) const { return dynamic_cast<PythonProject *>(parent->project()); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user