libqt5-qtbase/qapplication-emit-palettechanged.patch
Dominique Leuenberger 568390e1df Accepting request 519305 from KDE:Qt5
- Add patch to fix runtime changes to the palette:
  * qapplication-emit-palettechanged.patch

OBS-URL: https://build.opensuse.org/request/show/519305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=65
2017-09-04 10:18:42 +00:00

32 lines
1.2 KiB
Diff

From edc101a8d8adf29dc62dd5b64becaef972a45830 Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Mon, 9 Jan 2017 15:17:54 +0100
Subject: [PATCH] QApplication: Emit paletteChanged signal
This signal was added to QGuiApplication and QGuiApplication::setPalette.
Since this function is static QApplication has its own distinct implementation
which never emitted this signal. This results in items, such as QtQuick
SystemPalette, which listen to paletteChanged to not update when using
a QApplication.
Change-Id: I2b8108693743ec57934391025424ec9fee1c9c21
---
src/widgets/kernel/qapplication.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ef046f3e..045d3f7 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1514,6 +1514,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
else
*QApplicationPrivate::set_pal = palette;
QCoreApplication::setAttribute(Qt::AA_SetPalette);
+ emit qApp->paletteChanged(*QApplicationPrivate::set_pal);
}
}
--
2.7.4