Bug 111185 - [Qt] Use Qt5.1 supportedMimeTypes methods.
Summary: [Qt] Use Qt5.1 supportedMimeTypes methods.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 08:44 PST by Allan Sandfeld Jensen
Modified: 2013-03-07 05:54 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.37 KB, patch)
2013-03-01 08:46 PST, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (3.36 KB, patch)
2013-03-01 09:46 PST, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (3.42 KB, patch)
2013-03-07 05:30 PST, Allan Sandfeld Jensen
jturcotte: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld Jensen 2013-03-01 08:44:07 PST
QImageReader and QImageWriter now includes methods that returns the supported mimetypes directly, so we don't have to guess them from the format keys.

This should not a make any difference to the official imageformat plugins, but is cleaner and likely to fix 3rd party plugins.
Comment 1 Allan Sandfeld Jensen 2013-03-01 08:46:09 PST
Created attachment 190971 [details]
Patch
Comment 2 Early Warning System Bot 2013-03-01 08:57:37 PST
Comment on attachment 190971 [details]
Patch

Attachment 190971 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/16836263
Comment 3 Early Warning System Bot 2013-03-01 09:00:41 PST
Comment on attachment 190971 [details]
Patch

Attachment 190971 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/16867009
Comment 4 Allan Sandfeld Jensen 2013-03-01 09:17:11 PST
Comment on attachment 190971 [details]
Patch

C&P error
Comment 5 Allan Sandfeld Jensen 2013-03-01 09:46:36 PST
Created attachment 190979 [details]
Patch
Comment 6 Jocelyn Turcotte 2013-03-06 05:40:58 PST
Comment on attachment 190979 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190979&action=review

We should remove the old code as soon as 5.1 has been released, those ifdef are getting heavy.

> Source/WebCore/platform/MIMETypeRegistry.cpp:248
> +#if QT_VERSION >= 0x050100

#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)

> Source/WebCore/platform/MIMETypeRegistry.cpp:265
> +    //  Don't treat SVG as images directly if we can handle them internally.

"internally" is ambiguous, adding something like "let WebKit handle them" could help.

> Source/WebCore/platform/MIMETypeRegistry.cpp:295
> +#if QT_VERSION >= 0x050100

ditto

> Source/WebCore/platform/MIMETypeRegistry.cpp:307
> +#endif

This could deserve a "// QT_VERSION" as well
Comment 7 Allan Sandfeld Jensen 2013-03-07 05:30:28 PST
Created attachment 191978 [details]
Patch
Comment 8 Allan Sandfeld Jensen 2013-03-07 05:54:42 PST
Committed r145066: <http://trac.webkit.org/changeset/145066>