Remove ApplicationResourceFlags::ApplicationPaletteExplicitlySet

After 8fb881900c it's tracked by AA_SetPalette. Since the latter
is publicly observable we remove the internal flag instead.

Change-Id: Ie69799f1b45d68017cb9eaab2a9986cc9ac9ca38
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-12-13 11:47:42 +01:00
parent 05d5268502
commit 87cedab94e

View File

@ -166,7 +166,6 @@ bool QGuiApplicationPrivate::is_fallback_session_management_enabled = true;
enum ApplicationResourceFlags
{
ApplicationPaletteExplicitlySet = 0x1,
ApplicationFontExplicitlySet = 0x2
};
@ -3297,7 +3296,6 @@ void QGuiApplication::setPalette(const QPalette &pal)
else
*QGuiApplicationPrivate::app_pal = pal;
applicationResourceFlags |= ApplicationPaletteExplicitlySet;
QCoreApplication::setAttribute(Qt::AA_SetPalette);
if (qGuiApp)
@ -4100,8 +4098,7 @@ QPixmap QGuiApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
void QGuiApplicationPrivate::notifyThemeChanged()
{
if (!(applicationResourceFlags & ApplicationPaletteExplicitlySet) &&
!QCoreApplication::testAttribute(Qt::AA_SetPalette)) {
if (!testAttribute(Qt::AA_SetPalette)) {
clearPalette();
initPalette();
emit qGuiApp->paletteChanged(*app_pal);