Fix dbus export of property Device::supportedButtons
ClosedPublic

Authored by graesslin on Dec 10 2018, 10:14 AM.

Details

Summary

When launching the touchpad kcm we see the following warning:

Error on d-bus read of "supportedButtons"

And the Gui shows "Error while loading values. See logs for more
information. Please restart this configuration module".

By extending the unit test for reading back the properties through DBus
I noticed that it's not trivially possible to export QFlags to DBus. As
the QFlags can be implicitly casted to int, the property is changed to
an int value.

Test Plan

Test case adjusted, did not pass prior to change, passes now.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Dec 10 2018, 10:14 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 10 2018, 10:14 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Dec 10 2018, 10:14 AM

It might be required to also adjust the KCM. I haven't tested yet against a running KWin. Also I think this is a candidate for backport to LTS release as we get complaints about non functional touchpad kcm.

davidedmundson accepted this revision.Dec 10 2018, 12:27 PM
This revision is now accepted and ready to land.Dec 10 2018, 12:27 PM

FWIW, this change isn't needed on Qt5.12

This revision was automatically updated to reflect the committed changes.