diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-05-06 16:32:53 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-06-03 09:15:41 +0000 |
commit | 65137313b0e45e6dc9d31523c191267ffa45f911 (patch) | |
tree | 68c6d1716478bf2cb642c413cb4c2025ff00c473 /src/plugins/cpptools/cppprojects.cpp | |
parent | c5c57dca0ce12fc8fd4d9654b8b3cc602ca21023 (diff) | |
download | qt-creator-65137313b0e45e6dc9d31523c191267ffa45f911.tar.gz |
CppTools: Do not return a language option for ProjectFile::Unclassified
This led to an invalid command line ("-x" without further argument).
Change-Id: I8cfe1a8a29789fba426b61fe3702496d8089db6b
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppprojects.cpp')
-rw-r--r-- | src/plugins/cpptools/cppprojects.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppprojects.cpp b/src/plugins/cpptools/cppprojects.cpp index e6ebee607c..ee5ae0156a 100644 --- a/src/plugins/cpptools/cppprojects.cpp +++ b/src/plugins/cpptools/cppprojects.cpp @@ -596,9 +596,10 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt) { QStringList opts; - opts += QLatin1String("-x"); switch (fileKind) { + case ProjectFile::Unclassified: + break; case ProjectFile::CHeader: if (objcExt) opts += QLatin1String("objective-c-header"); @@ -643,6 +644,9 @@ static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objc break; } + if (!opts.isEmpty()) + opts.prepend(QLatin1String("-x")); + return opts; } |