aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/target.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-01-22 13:14:22 +0100
committerhjk <hjk@qt.io>2019-01-24 13:09:13 +0000
commit7f3de881e3d8196649e69e025c80d872fbea2e24 (patch)
tree7e3e3af98c653783bb5e039c0175fd45befc1483 /src/plugins/projectexplorer/target.cpp
parent197f2b5f2a8d5335040e0b8012797bf47a29f397 (diff)
ProjectExplorer: Remove some Id use from DeployConfig interface
There's a 1:1 relation between the involved types, having either the factory or the id implies having the other. So shorten interfaces that used both so far. Also canCreate() == canHandle() && id matches, so use that directly. Also drop/QTC_ASSERT former canHandle() checks that are implicit in preceding ::find() calls. Change-Id: I686ea5774c5a01b05b3b4882b3d59080a812a677 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/target.cpp')
-rw-r--r--src/plugins/projectexplorer/target.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp
index 05cc11de34..b42ed99d0a 100644
--- a/src/plugins/projectexplorer/target.cpp
+++ b/src/plugins/projectexplorer/target.cpp
@@ -527,8 +527,8 @@ void Target::updateDefaultDeployConfigurations()
foreach (Core::Id id, toCreate) {
foreach (DeployConfigurationFactory *dcFactory, dcFactories) {
- if (dcFactory->canCreate(this, id)) {
- DeployConfiguration *dc = dcFactory->create(this, id);
+ if (dcFactory->creationId() == id) {
+ DeployConfiguration *dc = dcFactory->create(this);
if (dc) {
QTC_CHECK(dc->id() == id);
addDeployConfiguration(dc);