diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-11-24 11:48:56 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-11-24 18:34:03 +0100 |
| commit | f18fcb6be58a5ffdbfc3b0ca8aa356153fa991bd (patch) | |
| tree | 9dcabfaaf607445891e8ab1f97d1336a33a7d9af /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | d70b847f776f0d0382c3b2ee1c7549a8a1edc1c1 (diff) | |
IconImage: make aware of platform icon engines
QQuickIconImage circumvented the QIcon loading process by going straight
to QIconLoader. This ignored any implementation of a QPlatformIconEngine
in the QPA plugin.
Without starting a big rewrite of the internal data structures, fix this
by not forgetting the icon's name if there is no theme that provides it,
and if there is an QIconEngine for the requested name, get the pixmap
from it and set it directly.
As a side-effect, this fixes the semantics of IconImage::name property,
which didn't store the name set, but the name loaded (which is empty if
no theme supports the requested name), and incorrectly emitted the
nameChanged signal when setting two names that both were not supported
by any theme.
This is a bit of a quick fix. The underlying problem of the disconnect
between Qt Quick's notion of "icon" and QIcon (e.g. QQuickIconImage has
no concept of state and mode) is larger, but will require bigger changes
that might be difficult to make without changing behavior.
Task-number: QTBUG-102346
Change-Id: Ibbb1fe6dbdfafd89a23d1c02f4265370a9a28a56
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions
