GenericProject: Support forwarding flags to clang code model

...in order to specify e.g. the language version to use.

Create the additional files project.cxxflags and project.cflags. These
are expected to contain command line flags for the clang code model on
one single line.

For example, "-std=c++11" can be provided to set the language version
for parsing.

Fixes: QTCREATORBUG-19668
Change-Id: I7712f546ba1fae536c32adfa5bd449c5b3484521
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-01-11 14:10:09 +01:00
parent a1ae5820af
commit 62c8aecb5f
6 changed files with 79 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ ProjectFilesFactory::ProjectFilesFactory()
addMimeType("application/vnd.qtcreator.generic.files");
addMimeType("application/vnd.qtcreator.generic.includes");
addMimeType("application/vnd.qtcreator.generic.config");
addMimeType("application/vnd.qtcreator.generic.cxxflags");
addMimeType("application/vnd.qtcreator.generic.cflags");
setDocumentCreator([]() { return new TextDocument(Constants::FILES_EDITOR_ID); });
setEditorActionHandlers(TextEditorActionHandler::None);