Skip to content

KFileItemActions: Add logic to order actions between separators

Robert-André Mauchin requested to merge rmauchin/kio:fix_ordering into master

Commit 33785332 has purposedly ordered actions by their name. However, this breaks separators in service context menus.

For example:

Actions=progressive;optimize;_SEPARATOR_;compress_50;compress_70;compress_75

The separator would end up at the end of the list:

Actions=compress_50;compress_70;compress_75;progressive|optimize;_SEPARATOR_

And since the logic check if the separator is the last item to add it:

!actions.last()->isSeparator()

separators basically disappear from service context menus.

The purpose of this commit is then to create groups of actions between each separator. Actions will be sorted within these groups, but it will keep service menus original order.

BUG: 466115

Edited by Alexander Lohnau

Merge request reports

Loading