Hi everybody:
libqtxdg is still using libmagic as the mimetypes provider.
Qt5 has mimetypes support: the QMimeDatabase and QMimeType classes.
QMimeDatabase is cached.
Qt4 has no real mimetype support. I found QtMimeTypes, the father of
Qt5 QMimeType/QMimeDatabase. I have been contributing to keep it in
shape. It works (at least) with Qt 4.7.2. It will be used for the
libqtxdg Qt4 version. The API is exactly the same as the Qt5 ones, no
#ifdefs needed. lxqt super repo already contains an module with a link
to the git repo. QtMimeTypes is here:
https://qt.gitorious.org/qtplayground/mimetypes
The default for the Qt4 version is using QtMimeTypes. Users that still
want to use the XdgMime/libmagic (e.g. Razor) can use the CMake
configuration option: USE_QTMIMETYES=Off
I pushed libqtxdg's changes to an mimetype branch at
https://github.com/lxde/libqtxdg/tree/mimetypes
I already started porting all the code to the new API. I will push the
porting it to an mimetypes branch in each modules that needs update.
When everything is Ok, we merge all mimetypes branches at the same time.
Comments are welcome.
Regards,
--
Luís Pereira