Shortcut Scheme support

Andreas Pakulat apaku at gmx.de
Sun Sep 28 18:00:51 BST 2008


On 28.09.08 17:29:47, Michael Jansen wrote:
> On Sunday 28 September 2008 11:08:10 Andreas Pakulat wrote:
> > On 28.09.08 03:09:39, Michael Jansen wrote:
> > > Ok. I did some research and the reason is what we all knew or should have
> > > known from reading KActions documentation.
> > >
> > > When calling "(QAction*)qaction->setShortcut()" kde's code doesn't get
> > > the chance to remember the default shortcut. Which means the code worked
> > > before apakus change. But only by chance.
> > >
> > > In okular for example the "browse tool" setup using a qaction* had the
> > > shortcut 'ctrl+1' but as a custom shortcut. No default shortcut there.
> > > Working but wrong behaviour.
> > >
> > > The "zoom tool" using kaction* had the "ctrl+2" shortcut as a default
> > > shortcut. The desired behaviour
> > >
> > > So the code using QAction::setShortcut worked before the shortcut scheme
> > > but not the way people expected. And i would consider it a bug if a
> > > program sets custom shortcuts instead of default shortcut. But noone
> > > noticed.
> >
> > Hmm, IMHO if apps do the wrong thing then apps should be fixed.
> > QAction::setShortcut was always advised against - AFAIK - from 4.0.0 on.
> > And I think its quite good this was catched now, when we still have 3-4
> > months until the next release, instead of after the hard feature freeze
> > when its only 2 months or so. Or in KDE 4.4, when somebody else changes
> > another place that depends on applications "doing the right thing".
> 
> But we talk about many applications here. I would say all.

I'd say its not all, in particular KDevelop, kwrite and kate do not suffer
from this. And I think (not 100% sure though) kpat, ksudoku and lskat
also not.

> It's the difference 
> between worked - - not correct, but no one noticed - against does not work 
> anymore and nothing was changed on their side. It's a gross behavioural change 
> and as such not acceptable if you ask me. It worked. It should keep doing 
> that.

Now I'm confused. I thought it never worked reliably, at least thats what
you said above (quoting here again) or I'm misunderstanding something:

> > > So the code using QAction::setShortcut worked before the shortcut
> > > scheme but not the way people expected.

Andreas

-- 
You will be awarded some great honor.




More information about the kde-core-devel mailing list