forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user