summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorTor Arne Vestbø <torarnv@gmail.com>2019-12-19 12:28:33 +0100
committerTor Arne Vestbø <torarnv@gmail.com>2019-12-21 14:30:11 +0100
commitc7ecff04609dd7d9282fa5de3d5d1e1fd189b4cb (patch)
treecaeda15aac20f47e5108d6c902287cde96bacb75 /src/widgets
parentfe784abc80a2e322a98a5100f6debe4ed8b0e17d (diff)
Simplify QApplication::palette
Change-Id: I1f1be554a72a385985eeee0b79b49acdfcf40d8e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 9b1202c491..a74b45f377 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1354,15 +1354,14 @@ QPalette QApplication::palette(const QWidget* w)
*/
QPalette QApplication::palette(const char *className)
{
- if (!QApplicationPrivate::app_pal)
- palette();
PaletteHash *hash = app_palettes();
if (className && hash && hash->size()) {
QHash<QByteArray, QPalette>::ConstIterator it = hash->constFind(className);
if (it != hash->constEnd())
return *it;
}
- return *QApplicationPrivate::app_pal;
+
+ return QGuiApplication::palette();
}
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash)