Revision 713615

Go back to digest for 23rd September 2007

Features in KDE Base

David Faure committed changes in /trunk/KDE/kdelibs:

Improve mimetype detection as discussed on the XDG list (thread "Shared-mime checking order"), implementing algorithm suggested by Alexander Larsson.

This makes mimetype detection more reliable (same results in all apps, instead of KFileItem not knowing when to refine the mimetype later), faster (when a single extension matches, no mime-magic is needed), and more flexible (we finally handle the case of conflicting extension definitions, like *.ogg or *.doc which can be msword or plain text, we figure out which one it is using mime-magic).

Ported the binary search in the "fast patterns" list to an actual multi-hash in ksycoca (KSycocaDict), which allows to get "all mimetypes matching a given extension", and which should also be much faster (less seeks).

Now I just hope that those changes to the spec will be accepted, otherwise we'll have a useless spec on one hand and a nice implementation in gnome and kde on the other hand...

File Changes

Modified 13 files
  • /trunk/KDE/kdelibs
  •   /kded/kbuildmimetypefactory.cpp
  •   /kded/kbuildservicefactory.cpp
  •   /mimetypes/kde.xml
  •   /kdecore/services/kmimemagicrule.cpp
  •   /kdecore/services/kmimemagicrule_p.h
  •   /kdecore/services/kmimetype.cpp
  •   /kdecore/services/kmimetypefactory.cpp
  •   /kdecore/services/kmimetypefactory.h
  •   /kdecore/sycoca/ksycoca.h
  •   /kdecore/tests/kmimetypetest.cpp
  •   /kdecore/tests/kstandarddirstest.cpp
  •   /kio/kio/kfileitem.cpp
  •   /kio/tests/kfileitemtest.cpp
13 files changed in total