ProjectExplorer: Move ITargetFactory to object pool

Makes multiple target factories per project possible

Reviewed-By: hunger
This commit is contained in:
dt
2010-12-06 16:15:41 +01:00
parent 95d7639bb7
commit 8697072ce4
15 changed files with 65 additions and 51 deletions

View File

@@ -132,13 +132,13 @@ QmlProjectTarget *QmlProjectTargetFactory::create(ProjectExplorer::Project *pare
if (!canCreate(parent, id))
return 0;
QmlProject *qmlproject(static_cast<QmlProject *>(parent));
QmlProjectTarget *t(new QmlProjectTarget(qmlproject));
QmlProjectTarget *target = new QmlProjectTarget(qmlproject);
// Add RunConfiguration (QML does not have BuildConfigurations)
QmlProjectRunConfiguration *runConf(new QmlProjectRunConfiguration(t));
t->addRunConfiguration(runConf);
QmlProjectRunConfiguration *runConf = new QmlProjectRunConfiguration(target);
target->addRunConfiguration(runConf);
return t;
return target;
}
bool QmlProjectTargetFactory::canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const