qtxdg Qt5 port

339 views
Skip to first unread message

Luís Pereira

unread,
Jul 26, 2013, 10:42:16 PM7/26/13
to razo...@googlegroups.com
Hi everybody:

I've ported the Razor qtxdg to Qt5. I started it before the merge with LXDE.
i don't know what it will be qtxdg future. But the port is done, anyway.
Both Qt4 and Qt5 versions can be compiled from the same source.

For the Qt4 version everything works as always.
To compile with Qt5 just add the -DUSE_QT5=On option to cmake.

I've extracted the qtxdg from the razor-qt repo and placed the port on
top of that.

Check it at https://github.com/luis-pereira/qtxdg

Comments, suggestions etc etc are very welcome

Regards,
--
Luís Pereira

PCMan

unread,
Jul 27, 2013, 12:59:38 AM7/27/13
to razo...@googlegroups.com, lxde-list

I think it's good to keep libqtxdg, but there,s one problem of it.
You used libmagic to handle mime-type sniffing, but it's not fully compatible with xdg.
If you agree, I'd like to create a patch letting it use glib instead.
Glib provides built-in xdg mime info spec implementation.
We can also eliminate libmagic dependency.
Is it OK for you?

--
--
You received this message because you are subscribed to the Google
Groups "Razor-qt" group.
For more options, visit this group at
http://groups.google.com/group/razor-qt?hl=en

---
You received this message because you are subscribed to the Google Groups "Razor-qt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to razor-qt+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Jerome Leclanche

unread,
Jul 27, 2013, 5:54:22 PM7/27/13
to razo...@googlegroups.com, lxde-list
QMimeType should be used, it's been backported to 4.8.

J. Leclanche

Luís Pereira

unread,
Jul 27, 2013, 9:44:08 PM7/27/13
to razo...@googlegroups.com, lxde-list
On Sat, Jul 27, 2013 at 2:54 PM, Jerome Leclanche <ady...@gmail.com> wrote:
> QMimeType should be used, it's been backported to 4.8.

That's great :) :)
I agree.

Luís Pereira

unread,
Jul 27, 2013, 10:02:49 PM7/27/13
to razo...@googlegroups.com, lxde-list
On Fri, Jul 26, 2013 at 9:59 PM, PCMan <pcma...@gmail.com> wrote:
> I think it's good to keep libqtxdg, but there,s one problem of it.
> You used libmagic to handle mime-type sniffing, but it's not fully
> compatible with xdg.
> If you agree, I'd like to create a patch letting it use glib instead.
> Glib provides built-in xdg mime info spec implementation.
> We can also eliminate libmagic dependency.
> Is it OK for you?

I'm not the original developer. Alexander Sokoloff is.
I don't know if other projects are using qtxdg. For Razor/LXDE the
dependency on glib is acceptable, but maybe there isn't for other
projects.

But as Jerome stated we can drop libmagic and use QMimeType and
QMimeDatabase, which are fully compatible with xdg.

That's the best of the two worlds.

--
Luís Pereira

chri...@surlykke.dk

unread,
Jul 28, 2013, 5:25:54 AM7/28/13
to razo...@googlegroups.com


lørdag den 27. juli 2013 skrev Jerome Leclanche :
QMimeType should be used, it's been backported to 4.8.


Are you sure? I can't seem to find it.

br. Chr.

Jerome Leclanche

unread,
Jul 28, 2013, 1:48:06 PM7/28/13
to razo...@googlegroups.com
Sorry, I misworded my post. It's not part of Qt, but it's a third party Qt 4 library that acts as an official backport of QMimeType.

I can't actually find it either, but IIRC Andromeda uses it.

J. Leclanche

Luís Pereira

unread,
Jul 28, 2013, 10:10:40 PM7/28/13
to razo...@googlegroups.com
On Sun, Jul 28, 2013 at 10:48 AM, Jerome Leclanche <ady...@gmail.com> wrote:
> Sorry, I misworded my post. It's not part of Qt, but it's a third party Qt 4
> library that acts as an official backport of QMimeType.

I found this project on Qt playground
http://qt.gitorious.org/qtplayground/mimetypes

And this one on github
https://github.com/pasnox/mimetypes-qt4

The later seems to be based on the playground one and it contains a
commit to support 4.7.x.

I will analyse them










--
Luís Pereira

PCMan

unread,
Jul 28, 2013, 10:34:11 PM7/28/13
to razo...@googlegroups.com, lxde-list
Just examined the code quickly.
It seems to implement xdg shared mime info spec.
Besides, it also supports cached mime database.
So it looks as complete as the glib one.
However, I still want to add a backend based on glib later, which
wraps glib calls in QMimeDatabase interface. When glib is available,
the MimeDatabase class can be a "very thin later" on top of it, saving
some memory.

Besides, Qt 5 seems to also provide "QStandardPaths", which can be a
replacement of qtxdg base dir spec implementation.

Thanks.

Jerome Leclanche

unread,
Jul 28, 2013, 10:39:21 PM7/28/13
to razo...@googlegroups.com, lxde-list

On Mon, Jul 29, 2013 at 3:34 AM, PCMan <pcma...@gmail.com> wrote:
However, I still want to add a backend based on glib later, which
wraps glib calls in QMimeDatabase interface. When glib is available,
the MimeDatabase class can be a "very thin later" on top of it, saving
some memory.

Seems to me like much of an effort and duplication for very small benefit?

J. Leclanche

PCMan

unread,
Jul 28, 2013, 10:40:49 PM7/28/13
to razo...@googlegroups.com, lxde-list
On Mon, Jul 29, 2013 at 10:34 AM, PCMan <pcma...@gmail.com> wrote:
> On Mon, Jul 29, 2013 at 10:10 AM, Luís Pereira
> <luis.artu...@gmail.com> wrote:
>> On Sun, Jul 28, 2013 at 10:48 AM, Jerome Leclanche <ady...@gmail.com> wrote:
>>> Sorry, I misworded my post. It's not part of Qt, but it's a third party Qt 4
>>> library that acts as an official backport of QMimeType.
>>
>> I found this project on Qt playground
>> http://qt.gitorious.org/qtplayground/mimetypes
>>
>> And this one on github
>> https://github.com/pasnox/mimetypes-qt4
>>
>> The later seems to be based on the playground one and it contains a
>> commit to support 4.7.x.
>>
>> I will analyse them
>
> Just examined the code quickly.
> It seems to implement xdg shared mime info spec.
> Besides, it also supports cached mime database.
> So it looks as complete as the glib one.
> However, I still want to add a backend based on glib later, which
> wraps glib calls in QMimeDatabase interface. When glib is available,
> the MimeDatabase class can be a "very thin later" on top of it, saving
> some memory.

Well, have a second look. It seems that QMimeType provides more
features than glib.
While wraping glib in a very thin QMimeDatabase like class is easy,
it's not possible to implement QMimeType with it. So I probably won't
do it. :-)

Pier Luigi

unread,
Sep 3, 2013, 9:03:31 AM9/3/13
to razo...@googlegroups.com
2013/7/27 Luís Pereira <luis.artu...@gmail.com>
Hi everybody:

I've ported the Razor qtxdg to Qt5. I started it before the merge with LXDE.
i don't know what it will be qtxdg future. But the port is done, anyway.
Both Qt4 and Qt5 versions can be compiled from the same source.

Kudos.

Should I consider this the official qtxdg repository and submit pull requests and issues?

--
Out of the box experience
http://www.maui-project.org/

Luís Pereira

unread,
Sep 3, 2013, 11:47:09 AM9/3/13
to razo...@googlegroups.com

On Tue, Sep 3, 2013 at 6:03 AM, Pier Luigi <pierluig...@gmail.com> wrote:
Should I consider this the official qtxdg repository and submit pull requests and issues?

The closest thing to an official repo with a tracker and pull request is at:
https://github.com/lxde/libqtxdg

Regards,
--
        Luís Pereira

Pier Luigi

unread,
Sep 4, 2013, 2:51:46 PM9/4/13
to razo...@googlegroups.com
2013/9/3 Luís Pereira <luis.artu...@gmail.com>

On Tue, Sep 3, 2013 at 6:03 AM, Pier Luigi <pierluig...@gmail.com> wrote:
Should I consider this the official qtxdg repository and submit pull requests and issues?

The closest thing to an official repo with a tracker and pull request is at:
https://github.com/lxde/libqtxdg


Thanks 

Leslie Zhai

unread,
Mar 30, 2014, 10:02:31 PM3/30/14
to razo...@googlegroups.com
Hi  Luís,

And I ported Qt5 bindings for PackageKit before https://github.com/xiangzhai/PackageKit-Qt/commit/a2308b9812935b5ea66fc73c5be8c313d9ff22f4

Your github repos https://github.com/luis-pereira/qtxdg is not available now?

Do you want to port the whole razor-qt to Qt5? please let me know, I wanna work together for the huge coding stuff :)

Regards,
Leslie Zhai

Luís Pereira

unread,
May 2, 2014, 11:57:33 AM5/2/14
to razo...@googlegroups.com
Hi
My repo is at https://github.com/luis-pereira/libqtxdg

Maybe later, Right now I have tons of things to do. And I will focus
on lxde-qt. I've been away and stuff pilled up.
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Razor-qt" group.
> For more options, visit this group at
> http://groups.google.com/group/razor-qt?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Razor-qt" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to razor-qt+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



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