Kits: Do not lose toolchains when using SDK-provided kits

The observed behavior is:

The first time you open Qt Creator from the Qt 5.6 package you get
the kit for the installed Qt version with a toolchain. The next time
you start the toolchain vanishes from the Kit.

Surprisingly nobody reported a bug about this:-/

Change-Id: I49545e11f02eadb73f583b134d9eadfc2adf3bec
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-11-11 11:02:42 +01:00
parent 4d1a1981a8
commit 1fc570acb7

View File

@@ -171,6 +171,8 @@ void KitManager::restoreKits()
Kit *toStore = 0;
foreach (Kit *current, kitsToValidate) {
toStore = current;
toStore->setup(); // Make sure all kitinformation are properly set up before merging them
// with the information from the user settings file
// Check whether we had this kit stored and prefer the stored one:
for (int i = 0; i < kitsToCheck.count(); ++i) {
@@ -191,8 +193,6 @@ void KitManager::restoreKits()
break;
}
}
if (toStore == current)
toStore->setup();
addKit(toStore);
sdkKits << toStore;
}