ProjectExplorer: reduce the perceived startup time

... by moving restoreKits to the delayed initialize phase.

Change-Id: If72e41b64ee71f2917b3f7a317d9887afc6e29e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2023-09-11 08:58:51 +02:00
parent f1fa1ad3d9
commit 0b85fc5aa0
13 changed files with 103 additions and 26 deletions

View File

@@ -224,13 +224,19 @@ CMakeKitAspectFactory::CMakeKitAspectFactory()
"This setting is ignored when using other build systems."));
setPriority(20000);
auto updateKits = [this] {
if (KitManager::isLoaded()) {
for (Kit *k : KitManager::kits())
fix(k);
}
};
//make sure the default value is set if a selected CMake is removed
connect(CMakeToolManager::instance(), &CMakeToolManager::cmakeRemoved,
this, [this] { for (Kit *k : KitManager::kits()) fix(k); });
connect(CMakeToolManager::instance(), &CMakeToolManager::cmakeRemoved, this, updateKits);
//make sure the default value is set if a new default CMake is set
connect(CMakeToolManager::instance(), &CMakeToolManager::defaultCMakeChanged,
this, [this] { for (Kit *k : KitManager::kits()) fix(k); });
this, updateKits);
}
Id CMakeKitAspect::id()