From 19b59f88d247b49b4a20609eeaee3cb972cfdf35 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Oct 2021 15:05:35 +0200 Subject: [PATCH] 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 Reviewed-by: David Schulz --- src/plugins/cppeditor/CppEditor.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/CppEditor.json.in b/src/plugins/cppeditor/CppEditor.json.in index 437e85c35f8..b3c0149291b 100644 --- a/src/plugins/cppeditor/CppEditor.json.in +++ b/src/plugins/cppeditor/CppEditor.json.in @@ -61,7 +61,7 @@ \" \", - \" \", + \" \", \" \", \" \", \" \",