forked from qt-creator/qt-creator
ProjectExplorer: Consolidate RunConfig creation codepaths
Move some code around to make interfaces slimmer. Also no need to check canHandle() twice per creation. Change-Id: I7c86e2dc78ebd53a0f8e9609e9fa135aaf31e7b7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -404,12 +404,7 @@ bool Project::copySteps(Target *sourceTarget, Target *newTarget)
|
||||
}
|
||||
|
||||
foreach (RunConfiguration *sourceRc, sourceTarget->runConfigurations()) {
|
||||
IRunConfigurationFactory *factory = IRunConfigurationFactory::find(newTarget, sourceRc);
|
||||
if (!factory) {
|
||||
runconfigurationError << sourceRc->displayName();
|
||||
continue;
|
||||
}
|
||||
RunConfiguration *newRc = factory->clone(newTarget, sourceRc);
|
||||
RunConfiguration *newRc = IRunConfigurationFactory::clone(newTarget, sourceRc);
|
||||
if (!newRc) {
|
||||
runconfigurationError << sourceRc->displayName();
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user