KMenu title is navigable with the keyboard

Thomas Lübking thomas.luebking at web.de
Thu Nov 19 14:47:49 GMT 2009


Am Thursday 19 November 2009 schrieb Albert Astals Cid:

> Any more suggestion or do i go with my patch?
Not aside "fixing" Qt (see my reply to Ossi) - but we should nevertheless 
start efforts on changing and aligning the KMenu titles with potential QMenu 
ones (i.e. fix styles and use similar painting code) so this could be dropped 
for Qt 4.6.x

regarding the patch:

- maybe name it "kmenu_title" (it's an action and obviously "this" ;-)

- you can probably spare the QWidgetAction cast (as you check for the object 
name anyway)

- QList is likely faster (the Set has a fix cost part, we don't expect too 
many elements and logically won't get dupes anyway) 
- also it /should/ be sufficient to just save and check the first title action 
(as it would be encountered first anyway - yesno? do we expect to loose it on 
up/down keys?)

- if the recursive titleaction is reached again 
"visitedTitles.contains(action)" you probably want to 
parent->setActiveAction(0);
as the point is to avoid kbd selection

Thomas




More information about the kde-core-devel mailing list