[Differential] [Request, 11 lines] D4757: Avoid capturing MenuItem instead determine checked state from toggled signal

David Edmundson noreply at phabricator.kde.org
Fri Feb 24 13:53:34 UTC 2017


davidedmundson created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  Due to JS lambdas menuItem is being captured by reference, and as such
  the call to menuItem.checked returns the checked state of the last item
  in the for loop. Instead of adding to the capture this patch uses the
  supplied boolean from the QMenuItem::toggled signal.
  
  Also unlike Array.concat Array.splice alters the current array, we don't
  want to create a new var.
  
  BUG: 376826

TEST PLAN
  Debug of menuItem.text showed we were capturing the wrong thing
  Clicked window into multiple activities and unticked them. All worked as intended

REPOSITORY
  R119 Plasma Desktop

BRANCH
  master

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

AFFECTED FILES
  applets/taskmanager/package/contents/ui/ContextMenu.qml

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: davidedmundson, #plasma
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170224/69c925be/attachment.html>


More information about the Plasma-devel mailing list