Bug 118705 - kate: wrong syntax highlighting chosen for filetype
Summary: kate: wrong syntax highlighting chosen for filetype
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 2.4.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 12:03 UTC by esigra
Modified: 2006-04-29 19:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>