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++")