Commit 9a0dce58 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Gcc: Cause less update signals to be sent

Cause less update signals to be sent when changing the compiler path.
parent dea6f67f
...@@ -386,18 +386,24 @@ void GccToolChain::setCompilerPath(const QString &path) ...@@ -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()) {
m_targetAbi = m_supportedAbis.at(0); if (m_supportedAbis.contains(currentAbi))
m_targetAbi = currentAbi;
else
m_targetAbi = m_supportedAbis.at(0);
}
if (displayName() == typeName()) if (resetDisplayName)
setDisplayName(defaultDisplayName()); setDisplayName(defaultDisplayName());
} }
updateId(); // Will trigger toolChainUpdated()! updateId(); // Will trigger toolChainUpdated()!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment