forked from qt-creator/qt-creator
ProjectExplorer: Fix re-detection of mingw toolchains
After restarting Qt Creator, auto-detected mingw toolchains were demoted to manual toolchains. Change-Id: Ie30185c0265849c4812dc060f19edea47900a7d1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1668,7 +1668,13 @@ Toolchains GccToolchainFactory::autoDetectToolchains(const FilePaths &compilerPa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (existingTcMatches) {
|
if (existingTcMatches) {
|
||||||
if (existingTc->typeId() == requiredTypeId && !result.contains(existingTc))
|
// We call this function only once for GCC and MinGW with required type
|
||||||
|
// GCC_TOOLCHAIN_TYPEID.
|
||||||
|
const bool typeMatches = existingTc->typeId() == requiredTypeId
|
||||||
|
|| (existingTc->typeId()
|
||||||
|
== Constants::MINGW_TOOLCHAIN_TYPEID
|
||||||
|
&& requiredTypeId == Constants::GCC_TOOLCHAIN_TYPEID);
|
||||||
|
if (typeMatches && !result.contains(existingTc))
|
||||||
result << existingTc;
|
result << existingTc;
|
||||||
alreadyExists = true;
|
alreadyExists = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user