Skip to content
  • Robert-André Mauchin's avatar
    KFileItemActions: Add logic to order actions between separators · b154c9d2
    Robert-André Mauchin authored and Alexander Lohnau's avatar Alexander Lohnau committed
    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
    b154c9d2