Commit ba0cf192 authored by Martin Flöser's avatar Martin Flöser

Fix dbus export of property Device::supportedButtons

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.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent c8ede9a5
This diff is collapsed.
......@@ -61,7 +61,7 @@ class Device : public QObject
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
// advanced
Q_PROPERTY(Qt::MouseButtons supportedButtons READ supportedButtons CONSTANT)
Q_PROPERTY(int supportedButtons READ supportedButtons CONSTANT)
Q_PROPERTY(bool supportsCalibrationMatrix READ supportsCalibrationMatrix CONSTANT)
Q_PROPERTY(bool supportsLeftHanded READ supportsLeftHanded CONSTANT)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment