On Wednesday 14 September 2011 20:01:10 Иван Комиссаров wrote: > Michael, take a look at https://gitorious.org/qmime it almost finished. Can' > look at what progress you have, but if you want to start from scratch i > don't think it is a good idea.
It is definitely not "almost finished". It parses the raw XML instead of parsing the generated plain text files, and it has its own copy of the freedesktop.org.xml instead of looking up the system files (which should be done with the QStandardPaths class I finished the MR for, yesterday). (https://qt.gitorious.org/qt/qtbase/merge_requests/50) Also, it exposes too much internals of the spec, such as the various fields for magic (content-based) matching; this is all because QtCreator has a GUI for defining your own mimetypes, but I can't think of any use case for a user defining his own magic rules... I think starting from a clean "this is what we want" API like Wolf-Michael is doing is a better idea. As Wolf-Michael noted, the API for creating mimetypes doesn't really belong in there; that's far too system-dependent, and far too "rare" compared to queries. And the implementation should parse the files generated by update-mime- database, which is much faster -- and I can provide the code for that, having already written all that code for KDE. So, from qmime.git, neither the API nor the implementation make much sense to me, only the unit tests are reusable. Well, the API can still provide input for qtaddonmimetype.git of course. On the other hand I'm not sure that querying the association with applications and the open/view/edit distinction belongs there, it doesn't seem very cross- platform -- but that's a separate discussion. -- David Faure, [email protected], http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org). _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
