hein added a comment.
So if I understand correctly, the Mnemonic stuff currently doesn't seem to
have the same aims as KAcceleratorManager does ...
KAcceleratorManager acts on a hierarchy of widgets, traverses it, assigns
weights to actionable things and possible mnemonics and overall smartly tries
to distribute mnemonics across the hierarchy.
If I understand correctly this is more like a convenience wrapper around
QKeySequence::mnemonic() that you can get both the label and a sequence to pass
to shortcut to.
I'm not really sure about those static mappings members ... there currently
doesn't seem to be any duplicate mnemonic tracking yet, right?
My feeling is that this is still too much boiler plate for the dev. At least
within a FormLayout, which has knowledge of what labels go with what, all the
assignment should probably just happen automatically without needing to have
your own Shortcut {} instances and getting the labels out of the Mnemonic
thing. Do you think we can do that somehow?
Overall the code in KAcceleratorManagement is quite good and nicely
commented, there's likely stuff of value in there (e.g. the algorithm it uses
to weight mnemonic characters).
REPOSITORY
R169 Kirigami
REVISION DETAIL
https://phabricator.kde.org/D8641
To: mart, #plasma, #kirigami, hein
Cc: colomar, ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff,
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, hein