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:
@@ -815,10 +815,7 @@ bool Target::fromMap(const QVariantMap &map)
|
||||
|
||||
// Ignore missing RCs: We will just populate them using the default ones.
|
||||
QVariantMap valueMap = map.value(key).toMap();
|
||||
IRunConfigurationFactory *factory = IRunConfigurationFactory::find(this, valueMap);
|
||||
if (!factory)
|
||||
continue;
|
||||
RunConfiguration *rc = factory->restore(this, valueMap);
|
||||
RunConfiguration *rc = IRunConfigurationFactory::restore(this, valueMap);
|
||||
if (!rc)
|
||||
continue;
|
||||
QTC_CHECK(rc->id().withSuffix(rc->extraId()) == ProjectExplorer::idFromMap(valueMap));
|
||||
|
||||
Reference in New Issue
Block a user