[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: setDefaultShortcutContext in KActionCollection (was: Re:
From:       Hamish Rodda <rodda () kde ! org>
Date:       2007-07-30 2:33:05
Message-ID: 200707301233.09378.rodda () kde ! org
[Download RAW message or body]


On Sat, 28 Jul 2007 05:13:48 pm Thomas Zander wrote:
> On Wednesday 25 July 2007 15:41:25 Robin Stocker wrote:
> > So, with setDefaultShortcutContext removed, what is the suggested way
> > to get the previous behaviour?
>
> Set it on the actions individually;  remember the default is a
> Qt::WindowShortcut so it works for you out of the box. But basically if
> you need it changed, then do it on your own.  KActionCollection is
> keeping its hands off of that option.
> Which I think is correct; its just a collection afterall.

Actually, setAssociatedWidget and addAssociatedWidget change the shortcut 
context to Qt::WidgetShortcut, to retain compatibility with kde3 KAccel.  Now 
that these extra methods are removed, there's not really a clean way to do 
this other than setting the shortcut context after the associated widget has 
been set up, or to do the work of *AssociatedWidget by hand.

We could remove this default but it would mean going through all code which 
uses *AssociatedWidget and implementing the widget default where 
*AssociatedWidget is called, when appropriate.

Cheers,
Hamish.

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic