Bug 471942 - If the Touchpad KCM is open via Kickoff or Krunner, the "Apply" button remains greyed out after a change
Summary: If the Touchpad KCM is open via Kickoff or Krunner, the "Apply" button remain...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_touchpad (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 472349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-04 13:16 UTC by Patrick Silva
Modified: 2023-07-26 17:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-07-04 13:16:59 UTC
STEPS TO REPRODUCE
1. search for Touchpad KCM with Kickoff or Krunner and open it
2. change any setting
3. 

OBSERVED RESULT
the "Apply" button remains greyed out

EXPECTED RESULT
active "Apply" button

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.1
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-07-16 10:24:33 UTC
Can confirm.
Comment 2 Nate Graham 2023-07-18 13:20:07 UTC
*** Bug 472349 has been marked as a duplicate of this bug. ***
Comment 3 Jakob Petsovits 2023-07-20 00:42:20 UTC
Possibly related, the header caption ("Touchpad" in the toolbar area) also doesn't show when opened with KRunner. Switching to another KCM and back makes everything work.
Comment 4 Jakob Petsovits 2023-07-25 20:00:32 UTC
(In reply to Jakob Petsovits from comment #3)
> Possibly related, the header caption ("Touchpad" in the toolbar area) also
> doesn't show when opened with KRunner. Switching to another KCM and back
> makes everything work.

I found a fix for the header caption, but unfortunately it's not the same root cause as the "Apply" button failure. Sorry! Will have to keep looking.
Comment 5 Bug Janitor Service 2023-07-25 21:29:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1623
Comment 6 Jakob Petsovits 2023-07-25 21:34:58 UTC
Found the problem :)
See the linked MR for more details!
Comment 7 Nate Graham 2023-07-26 17:21:59 UTC
Git commit 8671deb12554b659cae119d7d6f069682dcd6221 by Nate Graham, on behalf of Jakob Petsovits.
Committed on 26/07/2023 at 19:10.
Pushed by ngraham into branch 'master'.

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!)

M  +6    -1    kcms/mouse/kcm/libinput/libinput_config.cpp
M  +6    -1    kcms/touchpad/kcm/libinput/touchpadconfiglibinput.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/8671deb12554b659cae119d7d6f069682dcd6221