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 <>
parent 550a11a8
......@@ -4,7 +4,7 @@
<comment>C source code</comment>
<sub-class-of type="text/plain"/>
<alias type="text/x-c"/>
<glob pattern="*.c" case-sensitive="true"/>
<glob pattern="*.c" case-sensitive="true" weight="70"/>
<mime-type type="text/vnd.nvidia.cuda.csrc">
......@@ -25,14 +25,14 @@
<mime-type type="text/x-c++hdr">
<sub-class-of type="text/x-chdr"/>
<comment>C++ header</comment>
<glob pattern="*.hh"/>
<glob pattern="*.hxx"/>
<glob pattern="*.h++"/>
<glob pattern="*.hpp"/>
<glob pattern="*.hp"/>
<glob pattern="*.hh" weight="70"/>
<glob pattern="*.hxx" weight="70"/>
<glob pattern="*.h++" weight="70"/>
<glob pattern="*.hpp" weight="70"/>
<glob pattern="*.hp" weight="70"/>
<!-- Additions to freedesktop: -->
<glob pattern="*.h"/>
<glob pattern="*.H"/>
<glob pattern="*.h" weight="70"/>
<glob pattern="*.H" weight="70"/>
<!-- 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. -->
......@@ -47,19 +47,19 @@
<comment>C++ source code</comment>
<sub-class-of type="text/x-csrc"/>
<comment>C++ source code</comment>
<glob pattern="*.cpp"/>
<glob pattern="*.cxx"/>
<glob pattern="*.cc"/>
<glob pattern="*.C" case-sensitive="true"/>
<glob pattern="*.c++"/>
<glob pattern="*.cpp" weight="70"/>
<glob pattern="*.cxx" weight="70"/>
<glob pattern="*.cc" weight="70"/>
<glob pattern="*.C" case-sensitive="true" weight="70"/>
<glob pattern="*.c++" weight="70"/>
<!-- Additions to freedesktop: -->
<glob pattern="*.cp"/>
<glob pattern="*.inl"/>
<glob pattern="*.qdoc"/>
<glob pattern="*.tcc"/>
<glob pattern="*.tpp"/>
<glob pattern="*.t++"/>
<glob pattern="*.txx"/>
<glob pattern="*.cp" weight="70"/>
<glob pattern="*.inl" weight="70"/>
<glob pattern="*.qdoc" weight="70"/>
<glob pattern="*.tcc" weight="70"/>
<glob pattern="*.tpp" weight="70"/>
<glob pattern="*.t++" weight="70"/>
<glob pattern="*.txx" weight="70"/>
<magic priority="30">
<match value="-*- C++ -*-" type="string" offset="0:30"/>
......@@ -71,7 +71,7 @@
<expanded-acronym>Qt Meta Object Compiler</expanded-acronym>
<!-- Fix to freedesktop: moc is C++ source -->
<sub-class-of type="text/x-c++src"/>
<glob pattern="*.moc"/>
<glob pattern="*.moc" weight="70"/>
<mime-type type="text/x-objc++src">
......@@ -5,35 +5,35 @@
<!-- sub class is missing in the definition -->
<sub-class-of type="text/plain"/>
<comment>QML file</comment>
<glob pattern="*.qml"/>
<glob pattern="*.qml" weight="70"/>
<mime-type type="application/x-qt.qbs+qml">
<alias type="text/x-qt.qbs+qml"/>
<sub-class-of type="text/x-qml"/>
<comment>Qt Build Suite file</comment>
<glob pattern="*.qbs"/>
<glob pattern="*.qbs" weight="70"/>
<mime-type type="application/x-qt.ui+qml">
<alias type="text/x-qt.ui+qml"/>
<sub-class-of type="text/x-qml"/>
<comment>QtQuick Designer ui file</comment>
<glob pattern="*.ui.qml"/>
<glob pattern="*.ui.qml" weight="70"/>
<mime-type type="application/x-qmlproject">
<alias type="text/x-qmlproject"/>
<sub-class-of type="text/x-qml"/>
<comment>Qt Creator Qt UI project file</comment>
<glob pattern="*.qmlproject"/>
<glob pattern="*.qmlproject" weight="70"/>
<mime-type type="application/x-qt.meta-info+qml">
<alias type="text/x-qt.meta-info+qml"/>
<sub-class-of type="text/x-qml"/>
<comment>QML file</comment>
<glob pattern="*.qmltypes"/>
<glob pattern="*.qmltypes" weight="70"/>
<mime-type type="application/json">
<sub-class-of type="text/plain"/>
<comment>JSON file</comment>
<glob pattern="*.json"/>
<glob pattern="*.json" weight="70"/>
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