Commit bc9ffac3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

MimeTypes: Increase weight of common source types



To avoid expensive matching by glob or by contents.

Change-Id: Id873c02369915642821872d10b566006cc2be39f
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 550a11a8
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<comment>C source code</comment> <comment>C source code</comment>
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<alias type="text/x-c"/> <alias type="text/x-c"/>
<glob pattern="*.c" case-sensitive="true"/> <glob pattern="*.c" case-sensitive="true" weight="70"/>
</mime-type> </mime-type>
<mime-type type="text/vnd.nvidia.cuda.csrc"> <mime-type type="text/vnd.nvidia.cuda.csrc">
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
<mime-type type="text/x-c++hdr"> <mime-type type="text/x-c++hdr">
<sub-class-of type="text/x-chdr"/> <sub-class-of type="text/x-chdr"/>
<comment>C++ header</comment> <comment>C++ header</comment>
<glob pattern="*.hh"/> <glob pattern="*.hh" weight="70"/>
<glob pattern="*.hxx"/> <glob pattern="*.hxx" weight="70"/>
<glob pattern="*.h++"/> <glob pattern="*.h++" weight="70"/>
<glob pattern="*.hpp"/> <glob pattern="*.hpp" weight="70"/>
<glob pattern="*.hp"/> <glob pattern="*.hp" weight="70"/>
<!-- Additions to freedesktop: --> <!-- Additions to freedesktop: -->
<glob pattern="*.h"/> <glob pattern="*.h" weight="70"/>
<glob pattern="*.H"/> <glob pattern="*.H" weight="70"/>
<!-- Find include guards of header files without extension, for <!-- Find include guards of header files without extension, for
example, STL ones like <string>. Those can have a big initial example, STL ones like <string>. Those can have a big initial
comment exceeding 1000 chars, though. --> comment exceeding 1000 chars, though. -->
...@@ -47,19 +47,19 @@ ...@@ -47,19 +47,19 @@
<comment>C++ source code</comment> <comment>C++ source code</comment>
<sub-class-of type="text/x-csrc"/> <sub-class-of type="text/x-csrc"/>
<comment>C++ source code</comment> <comment>C++ source code</comment>
<glob pattern="*.cpp"/> <glob pattern="*.cpp" weight="70"/>
<glob pattern="*.cxx"/> <glob pattern="*.cxx" weight="70"/>
<glob pattern="*.cc"/> <glob pattern="*.cc" weight="70"/>
<glob pattern="*.C" case-sensitive="true"/> <glob pattern="*.C" case-sensitive="true" weight="70"/>
<glob pattern="*.c++"/> <glob pattern="*.c++" weight="70"/>
<!-- Additions to freedesktop: --> <!-- Additions to freedesktop: -->
<glob pattern="*.cp"/> <glob pattern="*.cp" weight="70"/>
<glob pattern="*.inl"/> <glob pattern="*.inl" weight="70"/>
<glob pattern="*.qdoc"/> <glob pattern="*.qdoc" weight="70"/>
<glob pattern="*.tcc"/> <glob pattern="*.tcc" weight="70"/>
<glob pattern="*.tpp"/> <glob pattern="*.tpp" weight="70"/>
<glob pattern="*.t++"/> <glob pattern="*.t++" weight="70"/>
<glob pattern="*.txx"/> <glob pattern="*.txx" weight="70"/>
<magic priority="30"> <magic priority="30">
<match value="-*- C++ -*-" type="string" offset="0:30"/> <match value="-*- C++ -*-" type="string" offset="0:30"/>
</magic> </magic>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<expanded-acronym>Qt Meta Object Compiler</expanded-acronym> <expanded-acronym>Qt Meta Object Compiler</expanded-acronym>
<!-- Fix to freedesktop: moc is C++ source --> <!-- Fix to freedesktop: moc is C++ source -->
<sub-class-of type="text/x-c++src"/> <sub-class-of type="text/x-c++src"/>
<glob pattern="*.moc"/> <glob pattern="*.moc" weight="70"/>
</mime-type> </mime-type>
<mime-type type="text/x-objc++src"> <mime-type type="text/x-objc++src">
......
...@@ -5,35 +5,35 @@ ...@@ -5,35 +5,35 @@
<!-- sub class is missing in the freedesktop.org definition --> <!-- sub class is missing in the freedesktop.org definition -->
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<comment>QML file</comment> <comment>QML file</comment>
<glob pattern="*.qml"/> <glob pattern="*.qml" weight="70"/>
</mime-type> </mime-type>
<mime-type type="application/x-qt.qbs+qml"> <mime-type type="application/x-qt.qbs+qml">
<alias type="text/x-qt.qbs+qml"/> <alias type="text/x-qt.qbs+qml"/>
<sub-class-of type="text/x-qml"/> <sub-class-of type="text/x-qml"/>
<comment>Qt Build Suite file</comment> <comment>Qt Build Suite file</comment>
<glob pattern="*.qbs"/> <glob pattern="*.qbs" weight="70"/>
</mime-type> </mime-type>
<mime-type type="application/x-qt.ui+qml"> <mime-type type="application/x-qt.ui+qml">
<alias type="text/x-qt.ui+qml"/> <alias type="text/x-qt.ui+qml"/>
<sub-class-of type="text/x-qml"/> <sub-class-of type="text/x-qml"/>
<comment>QtQuick Designer ui file</comment> <comment>QtQuick Designer ui file</comment>
<glob pattern="*.ui.qml"/> <glob pattern="*.ui.qml" weight="70"/>
</mime-type> </mime-type>
<mime-type type="application/x-qmlproject"> <mime-type type="application/x-qmlproject">
<alias type="text/x-qmlproject"/> <alias type="text/x-qmlproject"/>
<sub-class-of type="text/x-qml"/> <sub-class-of type="text/x-qml"/>
<comment>Qt Creator Qt UI project file</comment> <comment>Qt Creator Qt UI project file</comment>
<glob pattern="*.qmlproject"/> <glob pattern="*.qmlproject" weight="70"/>
</mime-type> </mime-type>
<mime-type type="application/x-qt.meta-info+qml"> <mime-type type="application/x-qt.meta-info+qml">
<alias type="text/x-qt.meta-info+qml"/> <alias type="text/x-qt.meta-info+qml"/>
<sub-class-of type="text/x-qml"/> <sub-class-of type="text/x-qml"/>
<comment>QML file</comment> <comment>QML file</comment>
<glob pattern="*.qmltypes"/> <glob pattern="*.qmltypes" weight="70"/>
</mime-type> </mime-type>
<mime-type type="application/json"> <mime-type type="application/json">
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<comment>JSON file</comment> <comment>JSON file</comment>
<glob pattern="*.json"/> <glob pattern="*.json" weight="70"/>
</mime-type> </mime-type>
</mime-info> </mime-info>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment