diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index e0f3939bf35..5376f0c7661 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -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 info = KitManager::kitInformation(); - for (int i = info.count() - 1; i >= 0; --i) - info.at(i)->setup(this); + const QList info = KitManager::kitInformation(); + for (KitInformation * const ki : info) + ki->setup(this); } void Kit::upgrade() diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index 499f1f19b45..0b6e5a8b16e 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -69,9 +69,11 @@ class KitManagerPrivate public: Kit *m_defaultKit = nullptr; bool m_initialized = false; - std::vector> m_informationList; std::vector> m_kitList; std::unique_ptr m_writer; + + // Sorted by priority, in descending order. + std::vector> m_informationList; }; } // namespace Internal