forked from qt-creator/qt-creator
KitManager: Remove temporary kit list
Change-Id: I4cf595e8c297040e936d8b4391e6df414828fb1f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -115,7 +115,6 @@ void KitManager::restoreKits()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(!d->m_initialized, return );
|
QTC_ASSERT(!d->m_initialized, return );
|
||||||
|
|
||||||
QList<Kit *> kitsToValidate;
|
|
||||||
QList<Kit *> kitsToCheck;
|
QList<Kit *> kitsToCheck;
|
||||||
|
|
||||||
QList<Kit *> resultList;
|
QList<Kit *> resultList;
|
||||||
@@ -124,16 +123,12 @@ void KitManager::restoreKits()
|
|||||||
KitList system
|
KitList system
|
||||||
= restoreKits(FileName::fromString(ICore::installerResourcePath() + KIT_FILENAME));
|
= restoreKits(FileName::fromString(ICore::installerResourcePath() + KIT_FILENAME));
|
||||||
// make sure we mark these as autodetected and run additional setup logic
|
// make sure we mark these as autodetected and run additional setup logic
|
||||||
foreach (Kit *k, system.kits) {
|
for (Kit *k : system.kits) {
|
||||||
k->setAutoDetected(true);
|
k->setAutoDetected(true);
|
||||||
k->setSdkProvided(true);
|
k->setSdkProvided(true);
|
||||||
k->makeSticky();
|
k->makeSticky();
|
||||||
}
|
}
|
||||||
|
|
||||||
// SDK kits are always considered to be up for validation since they might have been
|
|
||||||
// extended with additional information by creator in the meantime:
|
|
||||||
kitsToValidate = system.kits;
|
|
||||||
|
|
||||||
// read all kits from user file
|
// read all kits from user file
|
||||||
KitList userKits = restoreKits(settingsFileName());
|
KitList userKits = restoreKits(settingsFileName());
|
||||||
foreach (Kit *k, userKits.kits) {
|
foreach (Kit *k, userKits.kits) {
|
||||||
@@ -145,9 +140,9 @@ void KitManager::restoreKits()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kit *toStore = nullptr;
|
// SDK kits need to get updated with the user-provided extra settings:
|
||||||
foreach (Kit *current, kitsToValidate) {
|
for (Kit *current : system.kits) {
|
||||||
toStore = current;
|
Kit *toStore = current;
|
||||||
toStore->upgrade();
|
toStore->upgrade();
|
||||||
toStore->setup(); // Make sure all kitinformation are properly set up before merging them
|
toStore->setup(); // Make sure all kitinformation are properly set up before merging them
|
||||||
// with the information from the user settings file
|
// with the information from the user settings file
|
||||||
|
Reference in New Issue
Block a user