D19187: unbreak help button activation by not double-resetting the view

Harald Sitter noreply at phabricator.kde.org
Wed Feb 20 14:59:54 GMT 2019


sitter created this revision.
sitter added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION 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 <https://phabricator.kde.org/R102: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

REPOSITORY
  R102 KInfoCenter

BRANCH
  Plasma/5.15

REVISION DETAIL
  https://phabricator.kde.org/D19187

AFFECTED FILES
  infocenter.cpp
  infocenter.h
  sidepanel.cpp

To: sitter, #plasma
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190220/11efd9ed/attachment.html>


More information about the Plasma-devel mailing list