aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/target.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-27 09:08:01 +0100
committerhjk <hjk@qt.io>2018-03-02 15:32:21 +0000
commit6781217280800945ea4a48e12dfbb374e6396211 (patch)
tree66df5a535114664fe7027a4585a1718c416c1bd3 /src/plugins/projectexplorer/target.cpp
parent7acdf911a2e77766e3cd9b2d9ab72f0d40de3c41 (diff)
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>
Diffstat (limited to 'src/plugins/projectexplorer/target.cpp')
-rw-r--r--src/plugins/projectexplorer/target.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp
index 915110b61b..f21191dc1d 100644
--- a/src/plugins/projectexplorer/target.cpp
+++ b/src/plugins/projectexplorer/target.cpp
@@ -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));