forked from qt-creator/qt-creator
Gcc: Cause less update signals to be sent
Cause less update signals to be sent when changing the compiler path.
This commit is contained in:
@@ -386,18 +386,24 @@ void GccToolChain::setCompilerPath(const QString &path)
|
|||||||
if (path == m_compilerPath)
|
if (path == m_compilerPath)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (displayName() == defaultDisplayName())
|
bool resetDisplayName = displayName() == defaultDisplayName();
|
||||||
setDisplayName(typeName());
|
|
||||||
m_compilerPath = path;
|
m_compilerPath = path;
|
||||||
m_supportedAbis.clear();
|
m_supportedAbis.clear();
|
||||||
|
|
||||||
|
Abi currentAbi = m_targetAbi;
|
||||||
|
|
||||||
m_targetAbi = Abi();
|
m_targetAbi = Abi();
|
||||||
if (!m_compilerPath.isEmpty()) {
|
if (!m_compilerPath.isEmpty()) {
|
||||||
updateSupportedAbis();
|
updateSupportedAbis();
|
||||||
if (!m_supportedAbis.isEmpty())
|
if (!m_supportedAbis.isEmpty()) {
|
||||||
|
if (m_supportedAbis.contains(currentAbi))
|
||||||
|
m_targetAbi = currentAbi;
|
||||||
|
else
|
||||||
m_targetAbi = m_supportedAbis.at(0);
|
m_targetAbi = m_supportedAbis.at(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (displayName() == typeName())
|
if (resetDisplayName)
|
||||||
setDisplayName(defaultDisplayName());
|
setDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
updateId(); // Will trigger toolChainUpdated()!
|
updateId(); // Will trigger toolChainUpdated()!
|
||||||
|
Reference in New Issue
Block a user