From 650015ebffaec7cba7e97d2efdba3fd565573e52 Mon Sep 17 00:00:00 2001 From: Eike Ziller <eike.ziller@theqtcompany.com> Date: Wed, 25 Feb 2015 15:31:24 +0100 Subject: [PATCH] MimeTypes: Avoid checking magic matchers for .h files If we have "*.h" glob pattern with same weight in c-hdr and c++hdr, it also opens the files and checks magic matchers (for _all_ mime types, but that's another issue). Change-Id: I5dde180b3392d3a11354dce61fa577345c97b295 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> --- src/plugins/cppeditor/CppEditor.mimetypes.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/cppeditor/CppEditor.mimetypes.xml b/src/plugins/cppeditor/CppEditor.mimetypes.xml index 253f5d126ff..77d80cc81a5 100644 --- a/src/plugins/cppeditor/CppEditor.mimetypes.xml +++ b/src/plugins/cppeditor/CppEditor.mimetypes.xml @@ -6,6 +6,13 @@ <glob pattern="*.cu"/> </mime-type> + <mime-type type="text/x-chdr"> + <comment>C header</comment> + <sub-class-of type="text/x-csrc"/> + <!-- reduce weight from freedesktop to avoid conflict with text/x-c++hdr --> + <glob pattern="*.h" weight="30"/> + </mime-type> + <!-- Those are used to find matching headers by the CppTools plugin, so, they should match --> <mime-type type="text/x-c++hdr"> -- GitLab