Kits: Reduce magic while improving setup

Task-number: QTCREATORBUG-8576
Task-number: QTCREATORBUG-8081

Change-Id: I9a6675a8ae97517f78bca026c4aa0edca82d606d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-01-22 12:47:07 +01:00
parent 4d775ac56a
commit f2122583da
11 changed files with 61 additions and 22 deletions

View File

@@ -197,6 +197,21 @@ void Kit::fix()
i->fix(this);
}
void Kit::setup()
{
KitGuard g(this);
QHash<Core::Id, QVariant> 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;
}
}
QString Kit::displayName() const
{
return d->m_displayName;