Skip to content

Fix merging of XMLs with multiple ActionProperties tags

Mladen Milinkovic requested to merge work/maxrd2/fix-shortcuts into master

This fixes bug that was reported here: https://bugs.kde.org/show_bug.cgi?id=475016

Same bug is affecting at least Konsole and Kate. Also some bugs here could be related: https://bugs.kde.org/buglist.cgi?quicksearch=shortcut%20scheme

Adding new shortcut schemes will create xml similar to this:

    <ActionProperties scheme="Default">
        <Action name="seek_to_current_line" shortcut="F11"/>
    </ActionProperties>
    <ActionProperties scheme="Test">
        <Action name="adjust" shortcut="Ctrl+J"/>
        <Action name="advance_current_line" shortcut="Alt+Down"/>
        <Action name="anchor_remove_all" shortcut="Alt+Shift+A"/>
        <Action name="anchor_toggle" shortcut="Alt+A"/>
        <Action name="change_selected_lines_text_color" shortcut="Ctrl+Shift+C"/>
    </ActionProperties> 

Calling KXMLGUIClient::setXML(xmlDoc, merge) with a xmlDoc containing above snippet and merge set to true was not working.

Edited by Mladen Milinkovic

Merge request reports