rotation shortcuts patch for khistorycombo
bflat1 at gmx.net
Tue Jan 25 13:46:26 GMT 2005
On Tuesday 25 January 2005 10:41, David Faure wrote:
> On Monday 24 January 2005 13:55, Felix Berger wrote:
> Applied, thanks.
> (Do you want a CVS account? If so please follow the instructions at
> http://developer.kde.org/documentation/other/developer-faq.html#q1.8 )
Sure, thanks for the hint.
> > This could be remedied by instantiating a KAccel object for each of the
> > widgets (kcolorbutton.cpp, kcombobox.cpp, keditcl1.cpp, klineedit.cpp,
> > ktextedit.cpp):
> That seems like the only solution to me.
I'd step forward and produce the necessary patches. But before doing so we
should maybe discuss the benefits and drawbacks of private versus virtual
public slots for these methods.
Should new slots like:
etc. be implementation details or part of the public API. For instance
KLineEdit already defines copy as public virtual member function although it
is a public slot in QLineEdit already.
QLineEdit also offers paste() and cut() etc as virtual public slots, and
cursorForward(bool) are public member functions, so it would maybe make sense
to offer wordForward() etc. as public API too.
> Hmm. I wonder what Ellis thinks :). But it would mean two implementations
> of the KAccelBase/KAccelPrivate code, I'm not sure if that's a good idea.
Agreed. If the flood of new slots is not a problem of some kind I'm perfectly
fine with that.
> Unless we can really reuse the existing code. But I can't seem to pinpoint
> where the code does that concatenation right now... Or is done in Qt?
I think it's happening in KAccelPrivate::slotKeyPressed (kaccel.cpp) and
KAccelBase (line 594). Only the first part of a multi-key shortcut is
registered, then if it's pressed, a popupmenu is created and shown which
accepts the following keys if there are more than one starting with the same
prefix. So actually the events are not concatenated but the set of possible
actions is restricted.
One could also argue if the popupmenu that is always shown for multi-key
shortcuts isn't a bit bothersome to power users who know their shortcuts by
Use Debian GNU/Linux!
More information about the kde-core-devel