summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringbuilder.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-05-10 10:25:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-06-18 10:49:14 +0200
commitf4dca7c512ab3f8860f711de971af1fea76a1665 (patch)
treea55001f8b9a06079ab81aff5155d526e8e67ab8a /src/corelib/text/qstringbuilder.cpp
parentae36c1dc9c395e010334532319faaf4e3a911365 (diff)
Consult QIcon::fallbackThemeName() even for themes with explicit parents
We would previously only use the fallback theme for themes that did not exist, or for themes that did not declare any parent theme. We now unconditionally use the fallback theme, even for themes that declare their own parent themes, so that a QIcon::fromTheme("foo") that doesn't exist in the current theme, nor any of its parents, nor in "hicolor", will still be looked up in the fallback theme. The reason this seemed to work in the existing tests was because our test themes inherit system themes such as crystalsvg and gnome, and we didn't provide a hicolor theme. Any of these themes missing would lead us into the code path where we use the fallback theme for a missing theme, masking that fact that we had not added the fallback theme to the list of fallbacks for the theme that had explicit parents declared. The logic has been moved out of the theme parsing and into an accessor in QIconTheme, so that we're not caching the fallback theme lookup. [ChangeLog][QtGui][QIcon] QIcon::fallbackThemeName() will now be used as fallback even for themes that declare a parent theme. Pick-to: 6.5 6.6 Change-Id: Ib0ce1dfe97030f23893460ed624073a719a3ebd1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/corelib/text/qstringbuilder.cpp')
0 files changed, 0 insertions, 0 deletions