forked from qt-creator/qt-creator
ProjectExplorer: Simplify IBuildConfigurationFactory interface
Following the RunConfigurationFactory lead this replaces f = Foo::find(); f->do() by static Foo::do() stanzas. Also de-virtualize/private-ize IBuildConfigurationFactory::canCreate() as it is only a local helper nowadays. Change-Id: Id36ba514f426ebd054592189aa29c170ba00d92f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -741,14 +741,9 @@ bool Target::fromMap(const QVariantMap &map)
|
||||
if (!map.contains(key))
|
||||
return false;
|
||||
const QVariantMap valueMap = map.value(key).toMap();
|
||||
IBuildConfigurationFactory *factory = IBuildConfigurationFactory::find(this, valueMap);
|
||||
if (!factory) {
|
||||
qWarning("No factory found to restore build configuration!");
|
||||
continue;
|
||||
}
|
||||
BuildConfiguration *bc = factory->restore(this, valueMap);
|
||||
BuildConfiguration *bc = IBuildConfigurationFactory::restore(this, valueMap);
|
||||
if (!bc) {
|
||||
qWarning("Failed '%s' to restore build configuration!", qPrintable(factory->objectName()));
|
||||
qWarning("No factory found to restore build configuration!");
|
||||
continue;
|
||||
}
|
||||
QTC_CHECK(bc->id() == ProjectExplorer::idFromMap(valueMap));
|
||||
|
||||
Reference in New Issue
Block a user