Skip to content
Commit 8671deb1 authored by Jakob Petsovits's avatar Jakob Petsovits Committed by Nate Graham
Browse files

kcms/{mouse,touchpad}: Make "Apply" button work all the time

The (more or less identical) instantiations of QQuickWidget in the
libinput backends of Mouse and Touchpad KCMs are connecting the
QML file's changeSignal() to the C++ class's onChange() slot.
However, this does not work when the QQuickWidget hasn't yet
completed loading of the QML file. The signal doesn't yet exist.

As a result, when System Settings is started with kcm_mouse or
kcm_touchpad explicitly (e.g. via KRunner or CLI), onChange() is
never called and the "Apply" button remains greyed out, even if
changes are made in the UI.

The fix is to connect QQuickWidget::rootObject() only once the
QQuickWidget itself has signaled its readiness, via statusChanged().
Connecting statusChanged() is done before setSource() is called,
to eliminate any concerns about when readiness is reached.
(It could be ready immediately if the resource was already loaded!)

BUG: 471942
parent b6b8288c
Pipeline #445364 passed with stage
in 4 minutes and 33 seconds
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