<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>345411</bug_id>
          
          <creation_ts>2015-03-22 04:41:57 +0000</creation_ts>
          <short_desc>Secondary shortcuts are not persisted correctly</short_desc>
          <delta_ts>2015-06-08 20:20:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kxmlgui</product>
          <component>general</component>
          <version>5.0.0</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mike Smith">kde</reporter>
          <assigned_to name="kdelibs bugs">kdelibs-bugs-null</assigned_to>
          <cc>aroth</cc>
    
    <cc>kde</cc>
    
    <cc>linds.r</cc>
    
    <cc>msx</cc>
    
    <cc>peter</cc>
    
    <cc>tim</cc>
          
          <cf_commitlink>http://commits.kde.org/kxmlgui/c7b1b1b89e388779356a5dcde291d6e6eac7705b</cf_commitlink>
          <cf_versionfixedin>5.10.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1506709</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Smith">kde</who>
    <bug_when>2015-03-22 04:41:57 +0000</bug_when>
    <thetext>Changing the secondary shortcut for an action which has two results in the primary shortcut being cleared.

Reproducible: Always

Steps to Reproduce:
1. Open the Configure Shortcuts dialog in an affected application (I&apos;ve reproduced this in Kate and Konsole).
2. Find an action which by default has two key bindings (for example, Kate&apos;s Cut action has ctrl-X and shift-delete).
3. Change or remove the secondary binding.
4. Restart the application and open the Configure Shortcuts dialog again.

Actual Results:  
The primary shortcut is cleared (set to Custom, with the custom binding set to None). The secondary shortcut is reset to its default.

Expected Results:  
The key bindings I set are saved and restored the next time I run the application.

By experimenting with strace I&apos;ve found that this is (as far as I can tell) stored in ~/.local/share/kxmlgui5/katepart/katepart5ui.rc. The following is added to that file after making the change:

 &lt;ActionProperties scheme=&quot;Default&quot;&gt;
  &lt;Action shortcut=&quot;Ctrl+X; &quot; name=&quot;edit_cut&quot;/&gt;
 &lt;/ActionProperties&gt;

However, Kate&apos;s UI still displays &quot;Custom: None&quot; and &quot;Default: Shift+Del&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1512567</commentid>
    <comment_count>1</comment_count>
    <who name="Peter Cordes">peter</who>
    <bug_when>2015-04-21 05:35:41 +0000</bug_when>
    <thetext>I&apos;m seeing this too, on Kubuntu 15.04.  (KDE 5.9.0)
libkf5xmlgui5:amd64 5.9.0-0ubuntu1

I hadn&apos;t figured out yet that it was only multiple keybindings that were causing problems, so that&apos;s a help to be able to at least pick one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513692</commentid>
    <comment_count>2</comment_count>
    <who name="Lindsay Roberts">linds.r</who>
    <bug_when>2015-04-26 13:04:53 +0000</bug_when>
    <thetext>Confirmed on git master. Believe this bug is the cause behind the Konsole bugs:

https://bugs.kde.org/show_bug.cgi?id=340803
https://bugs.kde.org/show_bug.cgi?id=339243
https://bugs.kde.org/show_bug.cgi?id=337131</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1514208</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Roth">aroth</who>
    <bug_when>2015-04-28 05:01:17 +0000</bug_when>
    <thetext>I build kxmlgui with the patch from https://git.reviewboard.kde.org/r/123508/ and it works fine. Thanks Lindsay to track this down.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515311</commentid>
    <comment_count>4</comment_count>
    <who name="Lindsay Roberts">linds.r</who>
    <bug_when>2015-05-02 09:04:57 +0000</bug_when>
    <thetext>Git commit c7b1b1b89e388779356a5dcde291d6e6eac7705b by Lindsay Roberts.
Committed on 02/05/2015 at 08:57.
Pushed by roberts into branch &apos;master&apos;.

Fix shortcuts when secondary shortcut set.

If a user defined secondary (&quot;alternate&quot;) shortcut is set, an issue in
KXMLGUIFactory causes reloading of both primary and secondary from the
RC file&apos;s DOM to fail, resulting in no effective shortcuts available for
the action. Fix by checking for the correct type in the shortcut
property for QActions.

REVIEW: 123508

M  +36   -0    autotests/kxmlgui_unittest.cpp
M  +1    -0    autotests/kxmlgui_unittest.h
M  +3    -2    src/kxmlguifactory.cpp

http://commits.kde.org/kxmlgui/c7b1b1b89e388779356a5dcde291d6e6eac7705b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515314</commentid>
    <comment_count>5</comment_count>
    <who name="Lindsay Roberts">linds.r</who>
    <bug_when>2015-05-02 09:13:50 +0000</bug_when>
    <thetext>*** Bug 339243 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515316</commentid>
    <comment_count>6</comment_count>
    <who name="Lindsay Roberts">linds.r</who>
    <bug_when>2015-05-02 09:15:34 +0000</bug_when>
    <thetext>*** Bug 340803 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524947</commentid>
    <comment_count>7</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2015-06-08 20:20:07 +0000</bug_when>
    <thetext>*** Bug 346950 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>