Android/Qbs: Improve startup time

At startup the Android plugin looks at the NDK(s) for tool chains, and
the for matching tool chains already registered in Qt Creator. If it
finds one, it doesn't register a new one, but simply force-marks the
found one as auto-detected.
(See AndroidToolChainFactory::autodetectToolChainsFromNdks)

Unfortunately changing the auto-detected property of a tool chain
triggers a full update down the line, which for example Qbs takes as a
hint to re-create profiles.

This simply doesn't make sense. Setting the auto-detection flag
shouldn't result in these updates.

Task-number: QTCREATORBUG-25463
Change-Id: I22a5f6fbe08124a08041bf871e683bdbda279c01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2021-05-18 14:32:26 +02:00
parent 2c2a3a9bef
commit 801dbdf932

View File

@@ -280,14 +280,7 @@ void ToolChain::toolChainUpdated()
void ToolChain::setDetection(ToolChain::Detection de)
{
if (d->m_detection == de)
return;
if (d->m_detection == ToolChain::UninitializedDetection) {
d->m_detection = de;
} else {
d->m_detection = de;
toolChainUpdated();
}
d->m_detection = de;
}
QString ToolChain::typeDisplayName() const