From 2e489a23237f5cf6cacbeb0152c399aa3a0b897f Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Thu, 1 Feb 2024 03:51:26 +0000 Subject: [PATCH] sync: from linuxdeepin/dtkgui Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: https://github.com/linuxdeepin/dtkgui/pull/224 --- src/kernel/dguiapplicationhelper.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kernel/dguiapplicationhelper.cpp b/src/kernel/dguiapplicationhelper.cpp index e09e027..a661c16 100644 --- a/src/kernel/dguiapplicationhelper.cpp +++ b/src/kernel/dguiapplicationhelper.cpp @@ -210,9 +210,6 @@ class Q_DECL_HIDDEN GuiApplicationEventFilter : public QObject const QFont font(qGuiApp->font()); m_transmitter->q_func()->fontChanged(font); } break; - case QEvent::ApplicationPaletteChange: { - m_transmitter->onApplicationPaletteChanged(); - } break; default: break; } @@ -269,10 +266,11 @@ void DGuiApplicationHelperPrivate::initApplication(QGuiApplication *app) app->installEventFilter(new GuiApplicationEventFilter(this, app)); #else q->connect(app, &QGuiApplication::fontChanged, q, &DGuiApplicationHelper::fontChanged); +#endif + // TODO handle event in qt6. q->connect(app, &QGuiApplication::paletteChanged, q, [this] { onApplicationPaletteChanged(); }); -#endif if (Q_UNLIKELY(!appTheme)) { // 此时说明appTheme可能已经被初始化为了systemtheme if (QGuiApplicationPrivate::is_app_running) {