[KHintsSettings] Emit QGuiApplication::paletteChanged when run as QApplication
ClosedPublic

Authored by broulik on Feb 8 2017, 9:05 AM.

Details

Summary

QGuiApplication::setPalette and QApplication::setPalette are two distinct static functions and when the paletteChanged signal was introduced in QGuiApplication the latter was never adjusted.
SystemPalette connects to this signal to avoid installing an eventFilter on qApp for ApplicationPaletteChanged.
This causes e.g. QML-based System Settings modules to not update when changing color schemes but only the widget-based application around it.

Test Plan

Switching to Breeze Dark look and feel theme now updates the background of the QML parts. There's still some glitches like QQC buttons not repainting properly but at least it's not as embarrassing to look at as it used to be.

I'm trying to fix this in Qt but until this is in I think this patch is safe either way and will also benefit users of older Qt versions.

https://codereview.qt-project.org/#/c/181704/

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik retitled this revision from to [KHintsSettings] Emit QGuiApplication::paletteChanged when run as QApplication.Feb 8 2017, 9:05 AM
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R135 Integration for Qt applications in Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 8 2017, 9:05 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Feb 8 2017, 9:10 AM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Feb 8 2017, 9:10 AM
This revision was automatically updated to reflect the committed changes.