As far as i remember, i asked David to use kde code to read mime types… Dunno 
why it is still not in repo:)

About editing mimetypes - as far as QtCreator use editing it is good not to 
duplicate 2 databases - one 1 in Qt (read-only), other in Qt creator (with 
ability to add custom mime types).

>  " it exposes too much internals of the spec, such as the various fields for 
> magic (content-based) matching"

It is just 2 (two) methods in QMimeType… "too much", yes… Besides, they can be 
moved to QMutableMimeType (class for constructing new mime types) and most 
users won't see this details. Also, as far i have two classes, no problems for 
supporting editable mime types from API point of view - creating new mime types 
is already separated from reading/searching them.

In windows and mac native databases differ from shared mime info database - in 
win you can't search for mime type by content, only by extension; as for mac, 
names for mime type differs from shared mime info spec - for example "mkv" is 
something like "movie", not "video/x-matroska". As you support shared mime info 
names in QMimeData, you have to map mac mime names into shared mime info names.

I don't see any reasons to throw out mostly working code, except for searching 
algorithm, which can be replaced by kde one (10 minutes of work) and reading 
database, which is not exist in both implementations.

So, we also have open question about storing mime types under mac/win - user 
won't copy million text/xml files to deploy his program.

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to