D24908: fix default shortcut detection
Harald Sitter
noreply at phabricator.kde.org
Thu Oct 24 10:39:02 BST 2019
sitter created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
sitter requested review of this revision.
REVISION 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.
REPOSITORY
R263 KXmlGui
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D24908
AFFECTED FILES
src/kshortcuteditwidget.cpp
src/kshortcutsdialog_p.h
To: sitter
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191024/a928e83f/attachment.html>
More information about the Kde-frameworks-devel
mailing list