Fwd: kstdaccel patch

Felix Berger bflat1 at gmx.net
Sat Mar 20 13:32:52 GMT 2004


On Thursday 18 March 2004 22:37, David Faure wrote:
> On Tuesday 16 March 2004 11:44, Felix Berger wrote:
> > Thanks for pointing that out, I've attached a patch which implements the
> > scrolling shortcuts in kapplication.cpp.
>
> Cool.
>
> Just one thing, can you turn
>  receiver->inherits("QScrollView")
> into
>
>  ::qt_cast<QScrollView *>( receiver )
>
> ?
> It's much faster (no string comparison), and in a global event filter
> this really matters.

I used the receiver->inherits("QScrollView") because it's already used for 
filtering the QTextEdit and QLineEdit events a couple of lines above, is 
there a difference or should we change these to qt_cast<...*> too?

> hmm, but doesn't it break KWord ?

Yes, unfortunately it does. I guess we have to implement it for every 
application separately that does andvanced stuff with its scrollviews.

> In KWord we handle PgUp/PgDown in a special way (to move the caret,
> not just the scrollbars). Nothing can override an application-global event
> filters, so this basically prevents apps from doing anything other than
> what kapp wants, I realize now.
> With KLineEdit it's fine, people don't inherit KLineEdit very often, and
> don't want custom navigation shortcuts. QScrollView is much more generic.
> Maybe this should be done in more specialized subclasses (KIconView,
> KListView, and defining a KScrollView for khtmlview to use?).

I'll try that when I'm back from vacation.

> I'm for committing the KStdAccel patches, IMHO you should go ahead with
> those.

I don't have a cvs account, so maybe you could do that.

Felix

-- 
Use Debian GNU/Linux!
http://www.felix.beldesign.de/




More information about the kde-core-devel mailing list