ProjectExplorer: Fix Kit::setup()

This function traversed the kit aspects in the wrong order, presumably
based on outdated assumptions.

Change-Id: I1cbb9ed74b9ef165f410b88cac3f1ca9983d1647
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-03-06 09:54:02 +01:00
parent 3d1efce0a4
commit 7cfc18276f
2 changed files with 6 additions and 6 deletions

View File

@@ -269,11 +269,9 @@ void Kit::fix()
void Kit::setup()
{
KitGuard g(this);
// Process the KitInfos in reverse order: They may only be based on other information lower in
// the stack.
QList<KitInformation *> info = KitManager::kitInformation();
for (int i = info.count() - 1; i >= 0; --i)
info.at(i)->setup(this);
const QList<KitInformation *> info = KitManager::kitInformation();
for (KitInformation * const ki : info)
ki->setup(this);
}
void Kit::upgrade()

View File

@@ -69,9 +69,11 @@ class KitManagerPrivate
public:
Kit *m_defaultKit = nullptr;
bool m_initialized = false;
std::vector<std::unique_ptr<KitInformation>> m_informationList;
std::vector<std::unique_ptr<Kit>> m_kitList;
std::unique_ptr<PersistentSettingsWriter> m_writer;
// Sorted by priority, in descending order.
std::vector<std::unique_ptr<KitInformation>> m_informationList;
};
} // namespace Internal