diff options
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 3167bd423f..ab6d85aeb9 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -94,9 +94,6 @@ extern QClipboard *qt_clipboard; typedef QHash<QByteArray, QFont> FontHash; Q_WIDGETS_EXPORT FontHash *qt_app_fonts_hash(); -typedef QHash<QByteArray, QPalette> PaletteHash; -PaletteHash *qt_app_palettes_hash(); - #define QApplicationPrivateBase QGuiApplicationPrivate class Q_WIDGETS_EXPORT QApplicationPrivate : public QApplicationPrivateBase @@ -161,13 +158,12 @@ public: static QSize app_strut; static QWidgetList *popupWidgets; static QStyle *app_style; - static QPalette *sys_pal; - static QPalette *set_pal; protected: void notifyThemeChanged() override; - void sendApplicationPaletteChange(bool toAllWidgets = false, - const char *className = nullptr) override; + + QPalette basePalette() const override; + void handlePaletteChanged(const char *className = nullptr) override; #if QT_CONFIG(draganddrop) void notifyDragStarted(const QDrag *) override; @@ -188,12 +184,13 @@ public: static int enabledAnimations; // Combination of QPlatformTheme::UiEffect static bool widgetCount; // Coupled with -widgetcount switch - static void setSystemPalette(const QPalette &pal); - static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash); - static void initializeWidgetPaletteHash(); + static void initializeWidgetPalettesFromTheme(); static void initializeWidgetFontHash(); static void setSystemFont(const QFont &font); + using PaletteHash = QHash<QByteArray, QPalette>; + static PaletteHash widgetPalettes; + static QApplicationPrivate *instance() { return self; } #ifdef QT_KEYPAD_NAVIGATION |