diff options
| author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2024-10-08 17:29:57 +0200 |
|---|---|---|
| committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2024-10-23 14:40:31 +0200 |
| commit | 74487c313a96b45ad1afae06a365487be07fc908 (patch) | |
| tree | e84ed0d6bbaa606ee6cf536699ae26df750841ef /src/plugins/platforms/wasm/qwasmintegration.cpp | |
| parent | 6eefe0ca59dc25f7953b93e8b80c62c78a6ccfde (diff) | |
Avoid loading image format plugins until needed
Any image loading, even images with a normally built-in handler like
png, would cause all image format plugins to be loaded. This would
even happen during application initialization because of built-in
style and cursor images etc.
The reason was that QImageReader would first query all plugins for
their support of the given file suffix or format name, in order to
allow custom plugins to override the built-in format
handlers. However, image format plugins are required to register the
format names they support in the plugin metadata (the plugin json
file). So in order to support the override scenario, it is enough to
check the suffix/format against the plugins' metadata, and if a match
is found, to load and query the matching plugin(s). This commit
implements that change, moving the querying of all other plugins to be
done only if the suffix/format matches none of the built-in formats.
Fixes: QTBUG-129330
Change-Id: I799df9c340d4d86316de77bff32fdbd75caffd5f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
0 files changed, 0 insertions, 0 deletions
