ProjectExplorer: Avoid early creation of KitManager

This was only meant as part of a safety net, but in the case that
the situation this was guarding against actually happens we'd also
notice by simply not seeing the effect. This is not different to
any other place in the code where we e.g. create objects/widgets/...
and don't put them in the right container.

Change-Id: I0700fd3ca235662b718cf01229211a4eebec8a9a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-08-16 08:07:33 +02:00
parent b79ffcf8a2
commit fa011af1a0

View File

@@ -651,13 +651,6 @@ void KitManager::completeKit(Kit *k)
KitAspectFactory::KitAspectFactory() KitAspectFactory::KitAspectFactory()
{ {
kitAspectFactoriesStorage().addKitAspect(this); kitAspectFactoriesStorage().addKitAspect(this);
// Adding aspects created by this factory to possibly already existing kits is
// currently not needed here as kits are only created after all factories
// are created in *Plugin::initialize() or plugin load.
// Make sure we notice when this assumption breaks:
KitManager::instance(); // Ensure existence
QTC_CHECK(d->m_kitList.empty());
} }
KitAspectFactory::~KitAspectFactory() KitAspectFactory::~KitAspectFactory()