Fwd: kstdaccel patch

David Faure faure at kde.org
Thu Mar 18 21:37:15 GMT 2004


On Tuesday 16 March 2004 11:44, Felix Berger wrote:
> On Monday 15 March 2004 20:27, David Faure wrote:
> > This can be done in the KApplication global event filter, like we do to
> > make QLineEdit respect Ctrl+A etc.
> 
> 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 tested it, it seems to work fine in all kinds of listviews and in 
> konqueror's html views.

hmm, but doesn't it break KWord ?
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'm for committing the KStdAccel patches, IMHO you should go ahead with those.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list