CMake and Kits: Fix interaction between them

On initial run we offer the user a choice between all the kits, which
are compatible with the cached generator. After the initial run, the
user can't change kits nor generators anymore.
Except if the builds into a new directory or adds a buildconfiguration,
then the user can choose between generators but not kits.

Task-number: QTCREATORBUG-7940
Task-number: QTCREATORBUG-7928

Change-Id: I9b663435cd2e021f7fe08379c1c487a6aebe8976
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
This commit is contained in:
Daniel Teske
2012-10-02 17:46:19 +02:00
parent ffb90dff22
commit 9de676ce03
12 changed files with 412 additions and 214 deletions

View File

@@ -250,11 +250,21 @@ Target *Project::createTarget(Kit *k)
return 0;
Target *t = new Target(this, k);
t->createDefaultSetup();
if (!setupTarget(t)) {
delete t;
return 0;
}
return t;
}
bool Project::setupTarget(Target *t)
{
t->updateDefaultBuildConfigurations();
t->updateDefaultDeployConfigurations();
t->updateDefaultRunConfigurations();
return true;
}
Target *Project::restoreTarget(const QVariantMap &data)
{
Core::Id id = idFromMap(data);