Kit: small fixes

Change-Id: I24ce10ac147b116ca438681b34cdc4398675edeb
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-02-28 16:16:24 +01:00
parent 915c99858b
commit dea731088a
2 changed files with 7 additions and 11 deletions

View File

@@ -216,16 +216,11 @@ void Kit::fix()
void Kit::setup() void Kit::setup()
{ {
KitGuard g(this); KitGuard g(this);
QHash<Core::Id, QVariant> data = d->m_data; // Process the KitInfos in reverse order: They may only be based on other information lower in
for (int i = 0; i < 5; ++i) { // the stack.
// Allow for some retries to settle down in a good configuration QList<KitInformation *> info = KitManager::instance()->kitInformation();
// This is necessary for the Qt version to pick its preferred tool chain for (int i = info.count() - 1; i >= 0; --i)
// and that to pick a working debugger afterwards. info.at(i)->setup(this);
foreach (KitInformation *i, KitManager::instance()->kitInformation())
i->setup(this);
if (d->m_data == data)
break;
}
} }
QString Kit::displayName() const QString Kit::displayName() const

View File

@@ -66,7 +66,8 @@ public:
bool isValid() const; bool isValid() const;
bool hasWarning() const; bool hasWarning() const;
QList<Task> validate() const; QList<Task> 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. void setup(); // Apply advanced magic(TM). Used only once on each kit during initial setup.
QString displayName() const; QString displayName() const;