diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index e41e9a3a176..ca939296260 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -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; diff --git a/src/plugins/projectexplorer/kit.h b/src/plugins/projectexplorer/kit.h index 13f92bce474..20b9739e69a 100644 --- a/src/plugins/projectexplorer/kit.h +++ b/src/plugins/projectexplorer/kit.h @@ -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; diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index 36f94b65cc5..31eb7daf2c2 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -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