ProjectExplorer: only use local files for size comparison

Change-Id: Ifbf218d4e459462ec6a115e69a5f3688642fddda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2022-02-23 08:43:58 +01:00
parent 4af9842a51
commit 22dda4f8a5

View File

@@ -1194,10 +1194,16 @@ Toolchains GccToolChainFactory::autoDetectToolchains(
|| compilerPath.toString().contains("ccache")) {
existingTcMatches = existingCommand == compilerPath;
} else {
existingTcMatches = Environment::systemEnvironment().isSameExecutable(
existingCommand.toString(), compilerPath.toString())
|| (HostOsInfo::isWindowsHost() && existingCommand.toFileInfo().size()
== compilerPath.toFileInfo().size());
existingTcMatches = Environment::systemEnvironment()
.isSameExecutable(existingCommand.toString(),
compilerPath.toString());
if (!existingTcMatches
&& HostOsInfo::isWindowsHost()
&& !existingCommand.needsDevice()
&& !compilerPath.needsDevice()) {
existingTcMatches = existingCommand.toFileInfo().size()
== compilerPath.toFileInfo().size();
}
}
if (existingTcMatches) {
if (existingTc->typeId() == requiredTypeId && (!checker || checker(existingTc))