summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-12-07 13:43:44 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-12-07 14:34:57 +0000
commit8916e81c4ee5055537b15711fda90f0780b9d7a2 (patch)
tree38fbedebb1c164aaad2630719d9e640d8859ce72
parenta80273edf070f5aa1b58f859d5183e21c1a79496 (diff)
downloadqt-creator-8916e81c4ee5055537b15711fda90f0780b9d7a2.tar.gz
CppTools: Make objective c extension *.m unambiguous
...and thus avoid reading the file. The other candidate was "text/x-matlab". Change-Id: Ifb36b817cda654bcda37b7d675c2df4e60525a2b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/cpptools/CppTools.mimetypes.xml17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/plugins/cpptools/CppTools.mimetypes.xml b/src/plugins/cpptools/CppTools.mimetypes.xml
index 5c542d9829..00866009ef 100644
--- a/src/plugins/cpptools/CppTools.mimetypes.xml
+++ b/src/plugins/cpptools/CppTools.mimetypes.xml
@@ -37,9 +37,9 @@
example, STL ones like <string>. Those can have a big initial
comment exceeding 1000 chars, though. -->
<magic priority="50">
- <match value="#ifndef " type="string" offset="0:2000"/>
- <match value="#if " type="string" offset="0:2000"/>
- <match value="#include " type="string" offset="0:2000"/>
+ <match value="#ifndef " type="string" offset="0:2000"/>
+ <match value="#if " type="string" offset="0:2000"/>
+ <match value="#include " type="string" offset="0:2000"/>
</magic>
</mime-type>
@@ -59,7 +59,7 @@
<glob pattern="*.t++" weight="70"/>
<glob pattern="*.txx" weight="70"/>
<magic priority="30">
- <match value="-*- C++ -*-" type="string" offset="0:30"/>
+ <match value="-*- C++ -*-" type="string" offset="0:30"/>
</magic>
</mime-type>
@@ -83,4 +83,13 @@
<glob pattern="*.mm" weight="70"/>
</mime-type>
+ <mime-type type="text/x-objcsrc">
+ <comment>Objective-C source code</comment>
+ <sub-class-of type="text/x-csrc"/>
+ <glob pattern="*.m" weight="70"/>
+ <magic priority="30">
+ <match value="#import" type="string" offset="0"/>
+ </magic>
+ </mime-type>
+
</mime-info>