kcms/touchpad: Make sure settings fields in X11 are not randomly missing
Extracted from MR !2689 (merged) (no changes, applied cleanly and works as is) so this patch can go into 6.3 while the rest of !2689 (merged) will go into 6.4.
We will now load X11 props early for constants like "supports $xyz".
Before this, if QML makes use of a property during initialization,
it may incorrectly assume "unsupported" for a given libinput feature
and subsequent "load" calls won't fix that value, as its Q_PROPERTY
declaration marks it as CONSTANT
.
So let's move anything into the device (LibinputTouchpad) constructor
that determines a Q_PROPERTY
without change notifications.
A number of accessors for "supported" flags are simplified because
their .val boolean is sufficient by itself, remaining at their
default false
value if the feature is unavailable.
(In case you were wondering: KWinWaylandTouchpad
is also guilty of this, but gets away with it because getConfig()
is always loaded when a touchpad device is added by the backend. No commit in this MR to change it there.)