KPopupMenu (& hence K-Menu) keyboard navigation patch

Holger Freyther freyther at gmx.net
Sat Apr 27 09:46:19 BST 2002


kewl

But I've some comments and questions so far

Couldn't you make bool noMatches, shortcuts, autoExec; bit fields?
I mean doing it like bool noMatches:1; .... It seems like common practise to 
do so.

In keyPressEvent(QKeyEvent )

if (!d->shortcuts) {
+        // continue event processing by Qpopup
+        e->ignore();
+        QPopupMenu::keyPressEvent(e);
+        return;
+    }
do we really need to ignore this event and then pass it to QPopupMenu? This 
seems wrong to me or could you explain me the intended behaviour?

if (d->keySeq != QString::null) { in keyPressEvent why not make it 
!d->keySeq.isEmpty() ?

count() in QPopupMenu returns unsigned right? so you declare int i; but casts 
in a for loop unsinged int to int to avoid warnings. So why not use unsigned 
int for i?

besides the damn nitpicking the code looks ok

regards zecke




More information about the kde-core-devel mailing list