Bug 118705

Summary: kate: wrong syntax highlighting chosen for filetype
Product: [Applications] kate Reporter: esigra
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.4.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description esigra 2005-12-20 12:03:21 UTC
Version:           2.4.1 (using KDE KDE 3.4.3)
Installed from:    Gentoo Packages
OS:                Linux

Open a directory containing sourceode files in Konqueror. Have a file called constants.hh containing only a few defined constants. In Konqueror's filetype column the file is identified as C++ declaration file. Opening it in Kate gives no syntax highlighting (it should). Changing the name to constants.h makes Konqueror identify the file type as ordinary text document (it should be C declaration file). Opening in Kate gives syntax highlighting, but for C++ (it should be C).

In the Kontrolcenter under filebindings the mimetype "text/x-c++hdr" has the filename patterns "*.hh", "*.hpp", "*.H". The mimetype "text/x-chdr" has the filename pattern "*.h".
Comment 1 Anders Lund 2006-01-02 22:02:10 UTC
SVN commit 493660 by alund:

Add *.hh to filename mask.
BUG: 118705


 M  +1 -1      cpp.xml  


--- branches/KDE/3.5/kdelibs/kate/data/cpp.xml #493659:493660
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE language SYSTEM "language.dtd">
-<language name="C++" version="1.33" kateversion="2.4" section="Sources" extensions="*.cxx;*.cpp;*.cc;*.C;*.h;*.H;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9">
+<language name="C++" version="1.34" kateversion="2.4" section="Sources" extensions="*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9">
   <highlighting>
     <list name="keywords">
       <item> asm </item>
Comment 2 Dominik Haumann 2006-04-29 19:38:20 UTC
SVN commit 535514 by dhaumann:

forward port: Add *.hh to filename mask.
CCBUG: 118705


 M  +1 -1      cpp.xml  


--- trunk/KDE/kdelibs/kate/data/cpp.xml #535513:535514
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE language SYSTEM "language.dtd">
-<language name="C++" version="1.36" kateversion="2.4" section="Sources" extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9">
+<language name="C++" version="1.37" kateversion="2.4" section="Sources" extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9">
   <highlighting>
     <list name="keywords">
       <item> asm </item>