https://bugs.kde.org/show_bug.cgi?id=376826

David Edmundson <k...@davidedmundson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/pla
                   |                            |sma-desktop/e5df3ded85c94f0
                   |                            |a33afe12b18e6afad96f12639
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from David Edmundson <k...@davidedmundson.co.uk> ---
Git commit e5df3ded85c94f0a33afe12b18e6afad96f12639 by David Edmundson.
Committed on 24/02/2017 at 14:24.
Pushed by davidedmundson into branch 'Plasma/5.9'.

Avoid capturing MenuItem instead determine checked state from toggled signal

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.

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

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

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

M  +5    -6    applets/taskmanager/package/contents/ui/ContextMenu.qml

https://commits.kde.org/plasma-desktop/e5df3ded85c94f0a33afe12b18e6afad96f12639

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to