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

Review request for Plasma.


Repository: plasma-framework


Description
-------

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

This 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.

Adding the new overload is necessary for binary compatibility. A //BIC comment 
is added about merging the two methods in the future, as per the BIC page on 
the community wiki.

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