fix default shortcut detection

Authored by sitter on Oct 24 2019, 9:36 AM.

Description

fix default shortcut detection

Summary:
When the default shortcut is empty the UI string "None" is used to
indicate that. Alas, when mapping QKeySequences to the UI label we have to
rely on QKS::toString being equal/notequal to the text in the label and
that is not the case since an empty QKS will be an empty string, but
our display string is "None".

This resulted in the "custom" sequence detection incorrectly thinking all
shortcuts without a default are customized when in fact they aren't, the
strings are just different because we express it as "None" and QKS as "".
To mitigate this we'll simply ensure empty sequences are serialized to our
None reference string instead of an empty string.

Test Plan:
broken master:

with fix:

also tested continued working of:

  • setting a custom key
  • unsetting a custom key

Reviewers: dfaure, aacid

Reviewed By: aacid

Subscribers: aacid, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D24908

Details

Committed
sitterOct 25 2019, 10:43 AM
Reviewer
aacid
Differential Revision
D24908: fix default shortcut detection
Parents
R263:585ac6d25286: GIT_SILENT enable Qt deprecation warnings
Branches
Unknown
Tags
Unknown