qt5base-lts/tests/auto/gui/kernel
Tor Arne Vestbø 0a93db4d82 Unify application palette handling between QGuiApplication and QApplication
The logic is now mostly handled in QGuiApplication, with QApplication
only dealing with the widget-specific palettes and interaction between
the style and the palette.

The application now picks up changes to the platform theme and will
re-resolve the current application palette appropriately. This also
works even if an explicit application palette has been set, in which
case any missing roles are filled in by the theme.

The palette can now also be reset back to the default application
palette that's fully based on the theme, by passing in the default
constructed palette (or any palette that doesn't have any roles set).
This is also correctly reflected in the Qt::AA_SetPalette attribute.

Conceptually this means QGuiApplication and QApplication follow the
same behavior as QWidget, where the palette falls back to a base or
inherited palette for roles that are not set, in this case the theme.

Behavior-wise this means that the default application palette of the
application does not have any roles set, but clients should not have
relied on this, nor does QWidget rely on that internally.

It also means that setting a palette on the application and then
getting it back again will not produce the same palette as set,
since the palette was resolved against the theme in the meantime.
This is the same behavior as for QWidget, and although it's a
behavior change it's one towards a more sane behavior, so we
accept it.

[ChangeLog] Application palettes are now resolved against the platform's
theme palette, the same way widget palettes are resolved against their
parents, and the application palette. This means the application palette
reflected through QGuiApplication::palette() may not be exactly the same
palette as set via QGuiApplication::setPalette().

Change-Id: I76b99fcd27285e564899548349aa2a5713e5965d
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-13 16:53:05 +01:00
..
noqteventloop QEventDispatcherWin32: avoid livelock in a foreign event loop 2019-08-29 09:12:29 +00:00
qbackingstore Updated license headers 2016-01-21 18:55:18 +00:00
qclipboard QProcess: mark obsolete functions as deprecated 2019-01-23 18:49:12 +00:00
qcursor tst_QCursor::equality(): Silence warnings 2018-04-05 09:00:39 +00:00
qdrag Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
qevent Updated license headers 2016-01-21 18:55:18 +00:00
qfileopenevent Fix test for sandboxed targets 2016-09-15 14:25:50 +00:00
qguiapplication Unify application palette handling between QGuiApplication and QApplication 2020-01-13 16:53:05 +01:00
qguieventdispatcher unblacklist passing tests 2019-07-08 11:01:42 +00:00
qguieventloop unblacklist passing tests 2019-07-08 11:01:42 +00:00
qguimetatype Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
qguitimer Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
qguivariant Fix serializing QUuid with QDataStream with Qt 4 stream versions 2019-12-03 13:28:22 +02:00
qhighdpiscaling Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *) 2019-08-11 12:01:26 +02:00
qinputmethod tst_QInputMethod check WindowActivation capability instead of platform 2018-03-12 10:51:32 +00:00
qkeyevent Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
qkeysequence Remove usages of deprecated APIs from QtAlgorithms 2019-06-29 21:58:36 +02:00
qmouseevent Add helper function to reset QMouseEvent localPos 2016-08-01 09:58:23 +00:00
qmouseevent_modal Updated license headers 2016-01-21 18:55:18 +00:00
qopenglwindow Re-enable tst_QOpenGLWindow on Win32 2019-09-27 20:41:55 +02:00
qpalette Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
qpixelformat Updated license headers 2016-01-21 18:55:18 +00:00
qrasterwindow tests/auto/gui/kernel: Use QTRY_VERIFY instead of manual wait loops 2018-04-11 06:11:27 +00:00
qscreen Updated license headers 2016-01-21 18:55:18 +00:00
qsurfaceformat Updated license headers 2016-01-21 18:55:18 +00:00
qtouchevent Prepare for deprecating the QDesktopWidget 2019-10-15 20:09:29 +02:00
qwindow Prospective fix to stabilize tst_qwindow::isActive() on Windows 10 2019-10-03 15:09:16 +00:00
kernel.pro QHighDPI: Fix broken scaling of QPoint(F) 2019-08-01 13:20:23 +02:00