From: PCMan <pcm...@gm...> - 2013-07-29 02:40:56
|
On Mon, Jul 29, 2013 at 10:34 AM, PCMan <pcm...@gm...> wrote: > On Mon, Jul 29, 2013 at 10:10 AM, Luís Pereira > <lui...@gm...> wrote: >> On Sun, Jul 28, 2013 at 10:48 AM, Jerome Leclanche <ad...@gm...> 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. :-) > > Besides, Qt 5 seems to also provide "QStandardPaths", which can be a > replacement of qtxdg base dir spec implementation. > > Thanks. |