forked from qt-creator/qt-creator
ProjectExplorer: Make kits available earlier during startup
delayedInitialize is run in reverse dependency order, so ProjectExplorer's will naturally be run very late during startup. It also depends on which other plugins do what during delayed initialization. Since we want the kits to be available early during startup, so the user can e.g. click on a project in Welcome mode and have them available, it is better to use a custom, short timer for this instead. Task-number: QTCREATORBUG-19381 Change-Id: I7bafa9cf77b86c11d420bb684eadf51c48abd5ed Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1686,9 +1686,11 @@ void ProjectExplorerPlugin::extensionsInitialized()
|
||||
BuildManager::extensionsInitialized();
|
||||
|
||||
DeviceManager::instance()->addDevice(IDevice::Ptr(new DesktopDevice));
|
||||
// delay restoring kits until UI is shown for improved perceived startup performance
|
||||
QTimer::singleShot(0, this, &ProjectExplorerPlugin::restoreKits);
|
||||
}
|
||||
|
||||
bool ProjectExplorerPlugin::delayedInitialize()
|
||||
void ProjectExplorerPlugin::restoreKits()
|
||||
{
|
||||
dd->determineSessionToRestoreAtStartup();
|
||||
ExtraAbi::load(); // Load this before Toolchains!
|
||||
@@ -1696,7 +1698,6 @@ bool ProjectExplorerPlugin::delayedInitialize()
|
||||
ToolChainManager::restoreToolChains();
|
||||
dd->m_kitManager->restoreKits();
|
||||
QTimer::singleShot(0, dd, &ProjectExplorerPluginPrivate::restoreSession); // delay a bit...
|
||||
return true;
|
||||
}
|
||||
|
||||
void ProjectExplorerPluginPrivate::updateRunWithoutDeployMenu()
|
||||
|
@@ -123,7 +123,7 @@ public:
|
||||
//PluginInterface
|
||||
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
||||
void extensionsInitialized() override;
|
||||
bool delayedInitialize() override;
|
||||
void restoreKits();
|
||||
ShutdownFlag aboutToShutdown() override;
|
||||
|
||||
static void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes);
|
||||
|
Reference in New Issue
Block a user