Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9
-
None
Description
At present we only load the Tika MIME database if we haven't loaded the OpenDesktop.org one. Both count as "internal" for the purposes of the isInternalDatabase() check in this patch-set's QMimeDatabasePrivate::builtinComment(). However, the sets of MIME types they cope with, while overlapping substantially, are very different; each has some data the other lacks. See tst_QMimeDatabase::allMimeTypes() for comments on this.
When QMimeDatabasePrivate::builtinComment(), new in 6.9, on behalf of QMimeType::comment(), fails to find data for a MIME type in the OpenDesktop.org database, we could fall back to also loading the Tika database (add it to the end of the providers chain) and asking it for a comment.
In particular, since we now attempt to use Qt's translation system to translate a default (i.e. en-US) comment, and those translations are of the Tika comments, this could improve our ability to successfully find a translation of a Tika comment, for languages to which OpenDesktop.org does not provide a translation, particularly when the two sources have distinct default comments (so our fallback attempt to translate the OpenDesktop.org one fails).
This would, of course, increase the number of file extensions matching various MIME types, and the overall number of MIME types supported by the database; since these are the subjects of various tests, those tests would need an update. On account of that, this change was not implemented in QTBUG-127004's work, which considered adding the builtinComment() function and associated check.
Attachments
Issue Links
- relates to
-
QTBUG-132895 QMimeType::comment() will miss translations from later providers
-
- Open
-
- resulted from
-
QTBUG-127004 Separate translations for QMimeTypeDatabase
-
- Closed
-