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

List:       kfm-devel
Subject:    Re: Bug#4656: konqueror : Default keys to delete files
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-29 8:39:46
[Download RAW message or body]

On Wed, Jun 28, 2000 at 11:52:04PM -0400, Dawit Alemayehu wrote:
> On Sun, 18 Jun 2000, David Faure wrote:
> > Maybe the accel triggering happens BEFORE the event is sent to widgets ?
> 
> Well I finally had a chance to take a closer look at this.  It turns out the
> problem is QAccel.  It actually consumes the key events associated with the
> accelerators after emitting an activated(..) signal.  Hence, the event is never
> propagated past the top level widget.  Actually the emition of the activated
> signal  is also a problem.  I have attached a patch that will help solve this
> issue at the source rather than hacking around.  This patch should also work for
> other apps that need the same flexibility to accomplish the same things.  The
> only problem is that it has little chance of making it into an official Qt
> release because it breaks binary compatiability!!  Should I simply send a bug
> report to the trolls with this patch attached and let them find a better way to deal
> with it ??  Or does anyone else know a BC way of doing this ??
> 
> BTW, with this patch all we had to do to stop accelerator key events in konqy's
> combobox is to re-implement the enable Accelerator function and return false
> if the combobox had focus :))

Thanks for having looked into this.
I can't comment on the patch, because you forgot half of it I think
(it has qwidget.h, qwidget.cpp, then again qwidget.h and qwidget.cpp,
and I guess you had to change some other file to make this work...)

I think it's a step in the right direction but TT will probably not
apply it as is. One reason (besides BC) is that the API isn't self-explanatory.
QWidget::enableAccelerator should rather be dependent on the key that
was pressed, no ? You don't want to eat _all_ accelerators, but only
those who conflict with the widget...
Anyway, without the full patch I'm having trouble guessing what you intended to do :-)

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

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

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