qt6-bb10/tests/auto
Volker Hilsheimer 5f1fffc00e QIcon: add theme icon constants
Add a list of constant string literals for a subset of icons from the
freedesktop specification. Those are icons we document to support today,
and that users might have written themes for.

Omit icons that are mime types (we have Q(Abstract)FileIconProvider
and QPlatformTheme::fileIcon for that), the "flag-aa" icon (where 'aa'
is an ISO 3166 country code, and Face* icons. Flags and Face icons can
be added as supported QIcon constants, but should then be rendered as
emojis from the respective font (they are not provided by any of the
native icon libraries or icon fonts).

We use string constants instead of an enum so that we have the same code
path for icon constants, user-defined icons, and native icons. I.e. in
addition to QIcon::fromTheme(QIcon::ThemeIcon::EditCopy), code can
request the icon for "trash.circle.fill" on Apple platforms, or
or for U"\ue5cd" on platforms where the engine is font-based; or an app
can define their own icon name and provide the assets through a theme-
description, as before.

The downside is that we cannot use arrays for looking up the native icon
for an enum-value in the engine implementations, but given that icons
are cached this is an acceptable trade-off.

To make the list of icon contants more manageable, have them in a
separate header file. Since we want those constants to live in the QIcon
"namespace", we then include that header in a declaration of a nested
struct, "ThemeIcon", resulting in e.g. QIcon::ThemeIcon::EditCopy.

Change-Id: Ic20e36ab321e6c4b20806ec0b400bba13fffc983
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-12-07 12:39:06 +01:00
..
bic/data Add binary compatibility file for 6.6.0 2023-10-17 22:23:42 +03:00
cmake do not override initial AUTOMOC_MACRO_NAMES value 2023-11-28 19:59:49 +01:00
concurrent QtConcurrent::run() test: Add tests taking static function 2023-11-09 16:52:44 +00:00
corelib Check that QMulti{Map,Hash} (still) store in reverse insertion order 2023-12-07 07:16:23 +02:00
dbus tst_qdbusabstractadapter: Don't skip tests 2023-12-04 20:44:36 +01:00
gui QIcon: add theme icon constants 2023-12-07 12:39:06 +01:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
printsupport Dialogs: clean up native dialogs when object gets destroyed 2023-09-06 23:12:33 +02:00
shared coretext: Support variable application fonts 2023-10-03 19:25:46 +02:00
sql SQLite: Handle identifiers correctly 2023-09-28 20:51:33 +08:00
testlib tst_tostring: support computed expected values 2023-12-06 09:46:55 +00:00
tools qdbuscpp2xml: Register QtDBus metatypes 2023-11-28 13:37:56 +01:00
wasm CMake: Remove deprecated PUBLIC_LIBRARIES option in wasm tests 2023-11-29 15:00:57 +00:00
widgets Android: Skip focusProxy_QTBUG_51856() test case temporarily 2023-12-07 10:56:43 +02:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt CI: Enable some tests under corelib/thread for Wasm platform 2023-09-14 11:58:48 +02:00
network-settings.h QtNetworkSettings: narrow down hasIPv6 to specific OSes 2023-08-29 07:20:51 -07:00