aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-10-06 15:05:35 +0200
committerEike Ziller <eike.ziller@qt.io>2021-10-07 15:51:20 +0000
commit19b59f88d247b49b4a20609eeaee3cb972cfdf35 (patch)
tree29313fcbf0fedfa4d30ad051c2505f1dda1dded2
parent5156c8b510cedc888d5b489d52ef18f098979543 (diff)
Fix that .ui files could be opened in C++ editor
The glob "*.ui" is unfortunately not unique in the mime database, so it falls back to using the mime magic to determine the mime type. That process is unfortunately defined by the "standard" in a most useless way: Even if a mime type matches both by glob and by mime magic, a mime type that does not match by glob can be preferred, if its mime magic matches either with a higher priority, or with the same priority but is alphabetically "smaller" than the other mime type. Reduce the priority of the "#include" mime magic for the text/x-c++hdr mime type, so it is lower than the mime magic of the application/x- designer mime type. Fixes: QTCREATORBUG-21773 Change-Id: Idfb9ab509c13563b50381b098d643f6fa9292f27 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/plugins/cppeditor/CppEditor.json.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/CppEditor.json.in b/src/plugins/cppeditor/CppEditor.json.in
index 437e85c35f..b3c0149291 100644
--- a/src/plugins/cppeditor/CppEditor.json.in
+++ b/src/plugins/cppeditor/CppEditor.json.in
@@ -61,7 +61,7 @@
\" <!-- Find include guards of header files without extension, for\",
\" example, STL ones like <string>. Those can have a big initial\",
\" comment exceeding 1000 chars, though. -->\",
- \" <magic priority=\'50\'>\",
+ \" <magic priority=\'40\'>\",
\" <match value=\'#ifndef \' type=\'string\' offset=\'0:2000\'/>\",
\" <match value=\'#if \' type=\'string\' offset=\'0:2000\'/>\",
\" <match value=\'#include \' type=\'string\' offset=\'0:2000\'/>\",