From a38adc00561cc6d730582864da18b3c83eec21de Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 23 Sep 2019 19:57:19 +0200 Subject: [PATCH] GccToolChainFactory: Handle .exe suffix in detectForImport() Allow detection of gcc compilers with .exe suffix. Change-Id: I15e1050e872be0bac8934ecd4aa81914644948b5 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/gcctoolchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index df6a1286fea..f81a3860a10 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -996,7 +996,7 @@ QList GccToolChainFactory::autoDetect(const QList &alr QList GccToolChainFactory::detectForImport(const ToolChainDescription &tcd) { - const QString fileName = tcd.compilerPath.toString(); + const QString fileName = tcd.compilerPath.toFileInfo().completeBaseName(); if ((tcd.language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc") || fileName.endsWith("gcc"))) || (tcd.language == Constants::CXX_LANGUAGE_ID && (fileName.startsWith("g++") @@ -1764,7 +1764,7 @@ QList MingwToolChainFactory::autoDetect(const QList &a QList MingwToolChainFactory::detectForImport(const ToolChainDescription &tcd) { - const QString fileName = tcd.compilerPath.toString(); + const QString fileName = tcd.compilerPath.toFileInfo().completeBaseName(); if ((tcd.language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc") || fileName.endsWith("gcc"))) || (tcd.language == Constants::CXX_LANGUAGE_ID && (fileName.startsWith("g++")