A Sunday, May 15, 2011, Dominik Haumann va escriure:
> Hi,
> 
> in Kate, we create our Highlighting and Indentation menus on the fly, i.e.
> by using the signal aboutToShow(). We use this signal to avoid creating
> unneccesarily lots of menu items that may never be visible, i.e. kind of a
> lazy loading mechanism.
> 
> We fill the menu by naming menu items: "&" + string
> What happens (of course) is that an accelerator is used multiple times.
> 
> We use KAcceleratorManager to avoid this, but this does not work, since it
> also uses the signal aboutToShow() to check clashes (at least that's the
> theory), see
>   KPopupAccelManager::aboutToShow() in file kacceleratormanager.cpp
> 
> Do you have an idea how to avoid this?

You could change KAcceleratorManager to listen to the QEvent::Show event 
instead of listening to the aboutToShow signal, I think this would delay the 
resolution a bit so it would be done after you set your texts.

Albert

> 
> The bug I'm talking about is https://bugs.kde.org/show_bug.cgi?id=273262
> 
> Thanks for any hints!
> Dominik
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to