aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/gcctoolchain.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-09-23 19:57:19 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2019-09-25 09:55:20 +0000
commita38adc00561cc6d730582864da18b3c83eec21de (patch)
tree5366010562299da50f4adb2564e9a58952502522 /src/plugins/projectexplorer/gcctoolchain.cpp
parenta82b40e037417300309942575f2fa0d4fca4460c (diff)
GccToolChainFactory: Handle .exe suffix in detectForImport()
Allow detection of gcc compilers with .exe suffix. Change-Id: I15e1050e872be0bac8934ecd4aa81914644948b5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index df6a1286fe..f81a3860a1 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -996,7 +996,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetect(const QList<ToolChain *> &alr
QList<ToolChain *> 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<ToolChain *> MingwToolChainFactory::autoDetect(const QList<ToolChain *> &a
QList<ToolChain *> 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++")