unbreak help button activation by not double-resetting the view
ClosedPublic

Authored by sitter on Feb 20 2019, 2:59 PM.

Details

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.

BUG: 392597
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

Diff Detail

Repository
R102 KInfoCenter
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Feb 20 2019, 2:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 20 2019, 2:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Feb 20 2019, 2:59 PM
mart accepted this revision.Feb 26 2019, 10:42 AM
This revision is now accepted and ready to land.Feb 26 2019, 10:42 AM
This revision was automatically updated to reflect the committed changes.