ProjectExplorer: Fix ToolChainManager::isLoaded()

The presence of the accessor object does not indicate that the
toolchains have been restored, just that the restore process has
started.

Change-Id: I2ae3e3b091ebeab3ad4b401a1d8dcdb6a72e1408
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-09-08 13:25:51 +02:00
parent d8c3487037
commit 570e452b18

View File

@@ -68,6 +68,7 @@ public:
QList<ToolChain *> m_toolChains; // prioritized List QList<ToolChain *> m_toolChains; // prioritized List
QVector<LanguageDisplayPair> m_languages; QVector<LanguageDisplayPair> m_languages;
ToolchainDetectionSettings m_detectionSettings; ToolchainDetectionSettings m_detectionSettings;
bool m_loaded = false;
}; };
ToolChainManagerPrivate::~ToolChainManagerPrivate() ToolChainManagerPrivate::~ToolChainManagerPrivate()
@@ -127,6 +128,7 @@ void ToolChainManager::restoreToolChains()
for (ToolChain *tc : d->m_accessor->restoreToolChains(Core::ICore::dialogParent())) for (ToolChain *tc : d->m_accessor->restoreToolChains(Core::ICore::dialogParent()))
registerToolChain(tc); registerToolChain(tc);
d->m_loaded = true;
emit m_instance->toolChainsLoaded(); emit m_instance->toolChainsLoaded();
} }
@@ -187,7 +189,7 @@ ToolChain *ToolChainManager::findToolChain(const QByteArray &id)
bool ToolChainManager::isLoaded() bool ToolChainManager::isLoaded()
{ {
return bool(d->m_accessor); return d->m_loaded;
} }
void ToolChainManager::notifyAboutUpdate(ToolChain *tc) void ToolChainManager::notifyAboutUpdate(ToolChain *tc)