diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 68330b9dcdd..c1e55bb4d6e 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -216,16 +216,11 @@ void Kit::fix() void Kit::setup() { KitGuard g(this); - QHash data = d->m_data; - for (int i = 0; i < 5; ++i) { - // Allow for some retries to settle down in a good configuration - // This is necessary for the Qt version to pick its preferred tool chain - // and that to pick a working debugger afterwards. - foreach (KitInformation *i, KitManager::instance()->kitInformation()) - i->setup(this); - if (d->m_data == data) - break; - } + // Process the KitInfos in reverse order: They may only be based on other information lower in + // the stack. + QList info = KitManager::instance()->kitInformation(); + for (int i = info.count() - 1; i >= 0; --i) + info.at(i)->setup(this); } QString Kit::displayName() const diff --git a/src/plugins/projectexplorer/kit.h b/src/plugins/projectexplorer/kit.h index 16ec4452fa8..110e9728806 100644 --- a/src/plugins/projectexplorer/kit.h +++ b/src/plugins/projectexplorer/kit.h @@ -66,7 +66,8 @@ public: bool isValid() const; bool hasWarning() const; QList validate() const; - void fix(); // Fix the individual kit information. + 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. QString displayName() const;