So far, the keys of icon engine plugins were only interpreted as the suffix of icon files, loaded via QIcon(filename). However, an icon engine could provide a lot more flexibility if it could implement an entire theme. Match the list of keys a plugin can register itself with also against the current theme name. If a matching plugin is found, use that plugin to create the icon engine. Store the factory from the plugin to avoid costly lookups for each icon. Extend the QIcon test case by adding a custom plugin that supports two themes. Since the plugin and icon engine creation infrastructure doesn't communicate which theme the plugin was created for, use QIcon::themeName to record the current theme when the engine gets created. [ChangeLog][QtGui][QIconEnginePlugin] The keys registered by an QIconEnginePlugin implementation are now also matched against the current theme (system or user theme), allowing engine providers to implement entire themes through a plugin. Change-Id: I8a5e30ff8b5bb7c78b5204e82760e4328671e4c1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> |
||
|---|---|---|
| .. | ||
| image | ||
| itemmodels | ||
| kernel | ||
| math3d | ||
| painting | ||
| platform | ||
| qopengl | ||
| qopenglconfig | ||
| qvulkan | ||
| rhi | ||
| text | ||
| util | ||
| CMakeLists.txt | ||