diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-12-06 11:16:13 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-12-07 12:39:06 +0100 |
| commit | 8988c92b98c07d684fae655fbdf8791b99231e9e (patch) | |
| tree | 59b69c5e8562d3a0dc7401039665f4ac07b60dfb /src/gui/doc/snippets/code | |
| parent | 2ed64adb9fea52f1b13eae17ffc41b80cdd2d10e (diff) | |
QIcon: fall back to QPA engine if themes don't provide the icon
If the QIconLoaderEngine (which respects theme and fallback theme) does
not provide the icon, then try the QIconEngine provided by the
QPlatformTheme implementation of createIconEngine. If that provides the
requested icon, then use it; otherwise keep using an QIconLoaderEngine.
Clean up the logic of that code a bit, while maintaining the invariant
that we need to return a valid QIconEngine pointer.
[ChangeLog][QtGui][QIcon] If neither theme nor fallback theme provide
the requested icon, we fall back to the QPA plugin implementation. On
platforms where an implementation exists, this will override the
explicitly provided fallback (second parameter to QIcon::fromTheme).
Change-Id: Idbf9ed049f5e975e1fbcdbb30dbdf6eac08e5827
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
