forked from qt-creator/qt-creator
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>
This commit is contained 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\'/>\",
|
||||
|
Reference in New Issue
Block a user