frameworks: reenable the updateColorPalette slot
Review Request #114619 - Created Dec. 22, 2013 and submitted
This is a little bit hackish, so second opinion is welcomed (required). Back in KDE4 there was KGlobalSettings::kdisplayPaletteChanged() signal, which was generated, when DBus notification from kcontrol (?) arrived. Seems that with Qt5 QPA and its implementation in frameworks, this is gone. The recommended way is supossedly to * Note: If you derive from a QWidget-based class, a faster method is to * reimplement QWidget::changeEvent() and catch QEvent::PaletteChange. * This is the preferred way to get informed about palette updates. which doesn't work in a case of KateGlobal, which derives from QObject. So Loooking at the Qt5 kode, the QPA should send QEvent::ChangePallete to application object, which resends it to all widgets and to itself as QEvent::ApplicationChangePallete. So the solution simple taps to the event interface and listens for the right event.
none. `kcmshell5 colors` doesn't seems to change colors of running applications (at least for me and for now).
|Maybe we should call qApp->removeEventFilter(this) in the destructor (mainly for consistency)?||Dominik Haumann|
To me, the patch looks good. Atm I don't see another elegant solution to get this event, since the other classes that require this info are also not QWidget-based. So it's ok to commit, but we should make sure at some point that this works. Maybe come back to this in 1-2 months, when then frameworks integration matures more?