forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user