RFC: rename or kill KShortcut / add new triggers to KAction
ahartmetz at gmail.com
Thu Nov 2 22:35:52 GMT 2006
I never liked the mess of KAction, KShortcut and KAccel. Hamish Rodda
did a nice job cleaning it up and I still don't like the parts that
KShortcut is not much more than a QList<QKeySequence> now and I see no
good reason to keep it. Applications may need to adapt, but a quick
grep through kdebase didn't find any code that really needs KShortcut.
Additionally, QShortcut exists now (since Qt 4.0) and it is something
very different from KShortcut. This violates the principle of least
What I propose is to:
-rename KShortcut to KActionTriggerSet and make its API very similar
to KAction's shortcuts manipulation API. KActionTriggerSet should hold
exactly the triggers of one KAction including its default triggers,
not more and not less.
Additionally, I propose to add more kinds of triggers to KAction. The
first additional type of trigger would be mouse gestures which I
implemented as a proof of concept at akademy. Some work on
KShortcutDialog (also a suboptimal name, maybe change it to
KActionsConfigDialog?) would need to be done as a consequence. I could
probably do this too.
My gesture recognition algorithm is not great but it works reasonabld
well. It's just one function, however, and I'm sure that anybody with
a better algorithm could implement it easily.
What do you think?
More information about the kde-core-devel