CppEditor: Register qdoc as a separate mimetype from c++ sources

Add a new constant for qdoc mimetype to cpptoolsconstants.
Make the CppEditor handle qdoc mimetype.

This change has one user user visible effect:
Adding qdoc files to a qmake project will no longer put those files
into SOURCES where qmake will then try to compile them. They will show
up in "Other Files" instead.

Task-number: QTCREATORBUG-15872
Change-Id: Ibbf9af0a84fab59138f6b9ab41f1bba737b455c2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-03-15 13:36:50 +01:00
parent 1287b72728
commit 09cdd1c4a5
3 changed files with 8 additions and 1 deletions

View File

@@ -87,6 +87,7 @@ public:
addMimeType(CppTools::Constants::C_HEADER_MIMETYPE);
addMimeType(CppTools::Constants::CPP_SOURCE_MIMETYPE);
addMimeType(CppTools::Constants::CPP_HEADER_MIMETYPE);
addMimeType(CppTools::Constants::QDOC_MIMETYPE);
setDocumentCreator([]() { return new CppEditorDocument; });
setEditorWidgetCreator([]() { return new CppEditorWidget; });