diff options
author | Sergey Belyashov <Sergey.Belyashov@gmail.com> | 2015-04-16 00:24:06 +0300 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-04-16 13:36:53 +0000 |
commit | bcbf0d84179421706b07578b541ff50c3dfdfe62 (patch) | |
tree | bf3ace2e29e0c6a0271634fe0a03c620fc5b1f96 | |
parent | 171d16c6fb56c202efb7a3e79e7121dadac85265 (diff) | |
download | qt-creator-bcbf0d84179421706b07578b541ff50c3dfdfe62.tar.gz |
Fix toolchain detection when C compiler specified
If someone specifies C compiler instead of C++ one, then
extractToolchainPrefix() returns an empty result which
causes invalid behaiour on build stage.
Task-number: QTCREATORBUG-14250
Change-Id: I94d2a281c6a98178c486019344c6cdc71ac50a49
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
-rw-r--r-- | src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index 97a82d9c59..9fb3877e21 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -62,7 +62,9 @@ static QString extractToolchainPrefix(QString *compilerName) { QString prefix; if (compilerName->endsWith(QLatin1String("-g++")) - || compilerName->endsWith(QLatin1String("-clang++"))) { + || compilerName->endsWith(QLatin1String("-clang++")) + || compilerName->endsWith(QLatin1String("-gcc")) + || compilerName->endsWith(QLatin1String("-clang"))) { const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1; prefix = compilerName->left(idx); compilerName->remove(0, idx); |