forked from qt-creator/qt-creator
Kits: Upgrade SDK-Kits before trying to them up
This makes sure all keys have the expected names. Change-Id: I063a88c705de44c4ac079d790ad865e222259b53 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -289,6 +289,15 @@ void Kit::setup()
|
||||
info.at(i)->setup(this);
|
||||
}
|
||||
|
||||
void Kit::upgrade()
|
||||
{
|
||||
KitGuard g(this);
|
||||
// Process the KitInfos in reverse order: They may only be based on other information lower in
|
||||
// the stack.
|
||||
for (KitInformation *ki : KitManager::kitInformation())
|
||||
ki->upgrade(this);
|
||||
}
|
||||
|
||||
QString Kit::unexpandedDisplayName() const
|
||||
{
|
||||
return d->m_unexpandedDisplayName;
|
||||
|
@@ -69,6 +69,7 @@ public:
|
||||
void fix(); // Fix the individual kit information: Make sure it contains a valid value.
|
||||
// Fix will not look at other information in the kit!
|
||||
void setup(); // Apply advanced magic(TM). Used only once on each kit during initial setup.
|
||||
void upgrade(); // Upgrade settings to new syntax (if appropriate).
|
||||
|
||||
QString unexpandedDisplayName() const;
|
||||
QString displayName() const;
|
||||
|
@@ -165,6 +165,7 @@ void KitManager::restoreKits()
|
||||
Kit *toStore = 0;
|
||||
foreach (Kit *current, kitsToValidate) {
|
||||
toStore = current;
|
||||
toStore->upgrade();
|
||||
toStore->setup(); // Make sure all kitinformation are properly set up before merging them
|
||||
// with the information from the user settings file
|
||||
|
||||
|
Reference in New Issue
Block a user