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

List:       kde-core-devel
Subject:    Re: QAccel insertion madness
From:       Lubos Lunak <l.lunak () sh ! cvut ! cz>
Date:       2001-12-28 21:05:47
[Download RAW message or body]

On Fri 28. December 2001 02:23, Ellis Whitehead wrote:
> Hi guys,
>
> There are a _lot_ of superfluous QAccel::insertItem() calls being made
> somewhere in the KDE or Qt framework.
>
> Two examples, both in KWrite:
>
> 1) Clicking on the "Bookmarks" menu inserts the menu's items (two of them)
> into a QAccel object *four* times.
>
[snip]
>
> 2) One startup, any given accelerator specified in the kwriteui.rc file is
> inserted 19 times into 5 different QAccel objects.
>
> QAccel::insertItem( Ctrl+L, -14 ):    this = 8131f88 name = QPopupMenuAccel
[snip]
>
> -------
> Every key-press is then also run through a bunch of QAccel objects.  I
> doubt whether most of their existences are justified...  In any case, I've
> been tracing around to figure out why, but without all that much luck so
> far. Does anyone have any clue what's going on here?  I discovered it
> trying to get the emacs-style shortcuts working, but the shortcut is stolen
> by one of these exta QAccel objects.

 I think that's caused by calls to updateAccel() in 
QPopupMenu::menuStateChanged() and QPopupMenu::menuContentsChanged(). I 
already sent a patch to TT that reduce the number of calls to it, but I don't 
see the change in current Qt rsync yet.

-- 
 Lubos Lunak
 llunak@suse.cz ; l.lunak@kde.org
 http://dforce.sh.cvut.cz/~seli
[prev in list] [next in list] [prev in thread] [next in thread] 

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