KMimeMagic and text/x-c++

Alexander Dymo dymo at mk.ukrtelecom.ua
Sun Jun 18 11:57:23 BST 2006


On Saturday 17 June 2006 23:50, you wrote:
> The freedesktop.org shared mimetype database says text/x-c++hdr and
> text/x-c++src. So the right fix would be to fix the magic (which, for C++,
> is in kmimemagic.cpp and not in the kio/magic file).
Aha, I discovered more, KMimeMagic::findBufferFileType will use refineResult()
method to add "src" and "hdr" to the mimetype. KMimeMagic::findBufferType
will obviously not because it does not know the filename and can not tell
whether the buffer is source file or header.

So basically magic is ok, but applications are to be fixed to use
findBufferFileType instead of findBufferType when they know about the 
file name.

Still, I'd like kmimemagic to be smarter and never return x-c++
without src or hdr (see attachment).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kio_magic.diff
Type: text/x-diff
Size: 1614 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060618/ed2ee922/attachment.diff>


More information about the kde-core-devel mailing list