Bug 392597 - "Module Help" button always deactivated
Summary: "Module Help" button always deactivated
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: general (show other bugs)
Version: 5.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Hubner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-01 07:39 UTC by Gregor Mi
Modified: 2019-02-26 10:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Mi 2018-04-01 07:39:13 UTC
For each KInfocenter module the "Module Help" button is deactivated. Either there are no help files or something is broken.
Comment 1 Patrick Silva 2018-04-22 20:56:17 UTC
I see no "module help" button. Are you talking about "help" button present on bottom of each KCM? If so, on my Arch Linux (plasma 5.12.4) "help" button is enabled only in some KCMs, but nothing happens when it's clicked.
Comment 2 Patrick Silva 2018-04-22 21:00:51 UTC
Sorry. kinfocenter has "modulo help" button, it's enabled on my system but also nathing happens when it's clicked.
Comment 3 Harald Sitter 2019-02-26 10:45:44 UTC
Git commit 585b92af8f0e415ffb8c2cb6a4712a8fe01fbbc4 by Harald Sitter.
Committed on 26/02/2019 at 10:44.
Pushed by sitter into branch 'Plasma/5.15'.

unbreak help button activation by not double-resetting the view

Summary:
when sidepanel clickedSlot gets called it issues clicked() and that causes
a reset of the infocenter state (among other things disabling the help
button). previously this reset would happen all the time.
if you clicked the same kcm in the sidepanel twice the first click would
reset and then activate the help button, the second click would reset and
then not enable the help button because the kcm is already loaded (see
setKcm).

this broke in 5e27d9476e71d6e51c433e4edde3c403f6242aa8 which caused every
click event to get signaled twice for every single entry (thus always
resulting in a double reset) AND the commit also introduced
the reload-guard in setKcm which ultimately resulted in the entirely broken
behavior of resetting the UI twice but only loading kcm-dependent states
once

to resolve this problem the actual selected Item* is now held in the
InfoCenter and when a click is received it will only result in a UI reset
iff the clicked item isn't already the active item. the check in setKcm
is replaced by this.
additionally the sidepanel now only connects to activated() signals as
activation also includes activation-by-click rendering the second
connection a duplicate.
FIXED-IN: 5.15.2
CHANGELOG: The "Module Help" button gets enabled when help is available

Test Plan:
- select memory module (has documention)
- module help button enabled
- select about module (has no documentation)
- help disabled
- keyboard navigate to memory module
- help enabled
- click to double-activate the memory module
- help stays enabled

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19187

M  +9    -8    infocenter.cpp
M  +1    -0    infocenter.h
M  +0    -2    sidepanel.cpp

https://commits.kde.org/kinfocenter/585b92af8f0e415ffb8c2cb6a4712a8fe01fbbc4