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()
|
void Kit::setup()
|
||||||
{
|
{
|
||||||
KitGuard g(this);
|
KitGuard g(this);
|
||||||
// Process the KitInfos in reverse order: They may only be based on other information lower in
|
const QList<KitInformation *> info = KitManager::kitInformation();
|
||||||
// the stack.
|
for (KitInformation * const ki : info)
|
||||||
QList<KitInformation *> info = KitManager::kitInformation();
|
ki->setup(this);
|
||||||
for (int i = info.count() - 1; i >= 0; --i)
|
|
||||||
info.at(i)->setup(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::upgrade()
|
void Kit::upgrade()
|
||||||
|
@@ -69,9 +69,11 @@ class KitManagerPrivate
|
|||||||
public:
|
public:
|
||||||
Kit *m_defaultKit = nullptr;
|
Kit *m_defaultKit = nullptr;
|
||||||
bool m_initialized = false;
|
bool m_initialized = false;
|
||||||
std::vector<std::unique_ptr<KitInformation>> m_informationList;
|
|
||||||
std::vector<std::unique_ptr<Kit>> m_kitList;
|
std::vector<std::unique_ptr<Kit>> m_kitList;
|
||||||
std::unique_ptr<PersistentSettingsWriter> m_writer;
|
std::unique_ptr<PersistentSettingsWriter> m_writer;
|
||||||
|
|
||||||
|
// Sorted by priority, in descending order.
|
||||||
|
std::vector<std::unique_ptr<KitInformation>> m_informationList;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user