libqtxdg: Deprecating XdgMimeInfo (libmagic based) & adding XdgMimeType (QtMimeTypes based)

38 views
Skip to first unread message

Luís Pereira

unread,
Jul 24, 2014, 1:53:56 PM7/24/14
to lxde-list, razo...@googlegroups.com
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

PCMan

unread,
Jul 24, 2014, 11:08:24 PM7/24/14
to razo...@googlegroups.com, lxde-list
Great work!
I'd say just keep Qt4 "working" but don't spend too much time to make
it perfect.
Maintaining two code paths doubles the time for test and debugging.
Besides, all X11 related parts are handled differently for Qt4 and Qt5
port, which is a pain.
I'd suggest that we drop Qt4 and fully migrate to Qt5 ASAP.
Then we only need to maintain one code path, the makefiles will be
much cleaner, and we can start using some Qt5-only libraries, such as
kwindowsystem.
Since KDE 5 is released, Qt5 should be widely available now.
Just my two cents.

Luís Pereira

unread,
Aug 28, 2014, 8:31:32 AM8/28/14
to Damian Ivanov, PCMan, lxde-list, razo...@googlegroups.com
On Sat, Jul 26, 2014 at 11:56 AM, Damian Ivanov <damian...@gmail.com> wrote:
> I guess a re-implementation of
> http://qt-project.org/doc/qt-5/qstandardpaths.html would also be no
> longer needed in libqtxdg

I have to read the QStandardsPaths code carefully to see if it
complies with XDG.

Regards,
--
Luís Pereira
Reply all
Reply to author
Forward
0 new messages