With Qt 5.8 I get:
- invalid mimetype for QMimeDatabase ::mimeTypeForName("name.jpeg")
- JPEG mimetype for QMimeDatabase::mimeTypeForFile("name.jpeg", QMimeDatabase::MatchExtension)
Not sure if this is a Qt bug or intended.
With Qt 5.8 I get:
Not sure if this is a Qt bug or intended.
Opened a GIF image, saved as JPEG image.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
There is no Qt bug here.
mimeTypeForName("image/jpeg") would be the correct way to use mimeTypeForName.
Indeed this code wants mimeTypeForFile instead.
But if the goal is then suffixes().first(), then preferredSuffix() is a more direct way to do this.
PS: if the repo was set I could look into the context more easily...
True. Why does phabricator say "Context not available" then? Missing branch information maybe?