KAction port: do we need to support multiple shortcuts per action?

Hamish Rodda rodda at kde.org
Tue Nov 29 17:28:55 GMT 2005


On Wednesday 30 November 2005 03:58, Matthias Ettrich wrote:
> On Tuesday 29 November 2005 17:02, Hamish Rodda wrote:
> > If we were to use QAction as a base for KAction in KDE4, to
> > keep this feature we (or Trolltech) would have to add multiple sequence
> > support.
>
> ...which is trivial to do in a few lines of code.

Ok, not the impression I had before, but it's the best solution for KDE :)

> Wrt the API, is one 
> alternative shortcut enough or does it have to be lists? Is it OK that the
> shortcut context is the same for all shortcuts?

I don't think the KDE api allowed for different contexts in the one action 
previously, so I would think so (if someone can come up with a valid use case 
for having multiple Qt::ShortcutContexts, now would be the time).

> In that case, adding a 
> simple
>
>  void setAlternativeShortcuts(const QList<QKeySequence>&)
>  QList<QKeySequence> alternativeShortcuts() const;
>
> is all it takes. And sending a patch to qt-bugs.

Great :)

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051130/8b1c081e/attachment.sig>


More information about the kde-core-devel mailing list