-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127645/
-----------------------------------------------------------

(Updated April 13, 2016, 9:17 a.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma.


Changes
-------

Submitted with commit 70301e21b99c8cc476a151e12cd4ee07c8b6598c by Eike Hein to 
branch master.


Repository: plasma-framework


Description
-------

This adds a second MenuItem parameter to addMenuItem, which is used as a 
position reference for inserting the new item.

The resulting API matches QWidget::insertAction in spirit.

Implicitly allows reordering items in the menu by removing and reinserting if 
an item already exists (adding actions multiple times was already not supported 
due to "A QWidget should only have one of each action and adding an action it 
already has will not cause the same action to be in the widget twice." in the 
underlying implementation). This is actually quite useful because it aligns 
well with parenting a PlasmaComponents.MenuItem initially to the menu via 
Qt.createQmlObject(), then moving it into the desired place before opening the 
menu.

This will be used by the Task Manager applet for dynamically adding actions for 
recent docs and jump list actions to a task context menu.


Diffs
-----

  src/declarativeimports/plasmacomponents/qmenu.h baee963 
  src/declarativeimports/plasmacomponents/qmenu.cpp d84f481 

Diff: https://git.reviewboard.kde.org/r/127645/diff/


Testing
-------


Thanks,

Eike Hein

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to