Target: Make constructor private

Use Project::createTarget consistently

Change-Id: Ic8b60f35a830080d325758c93bca7068c9859c59
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-11-16 17:10:55 +01:00
parent f133ca30e3
commit 22e3a7b3a4
3 changed files with 4 additions and 10 deletions

View File

@@ -606,13 +606,8 @@ Project::RestoreResult QbsProject::fromMap(const QVariantMap &map, QString *erro
return result;
Kit *defaultKit = KitManager::defaultKit();
if (!activeTarget() && defaultKit) {
Target *t = new Target(this, defaultKit);
t->updateDefaultBuildConfigurations();
t->updateDefaultDeployConfigurations();
t->updateDefaultRunConfigurations();
addTarget(t);
}
if (!activeTarget() && defaultKit)
addTarget(createTarget(defaultKit));
return RestoreResult::Ok;
}