[PATCH] 'sending unencrypted data' warning dialog regressions

David Faure faure at kde.org
Tue Nov 25 17:38:09 GMT 2003


On Tuesday 25 November 2003 17:39, Lubos Lunak wrote:
> Each keyboard input results in 3 separate key events: KeyDown, followed by 
> KeyPress, followed KeyUp. All platforms must generate these events in this 
> sequence for every keyboard input (except IME events).
> 
> Key repeat (automatic generation of keyevents when a key is held down) results 
> in a sequence of a KeyDown event, followed by multiple keypress events, 
> terminated by a KeyUp event. A keypress event should be generated for each 
> platform key repeat event recieved.

Right.

>  I'll take your mail as a proof that it's really broken. 
Well, only autorepeat was broken - it was worse before, trust me :)

>  I suggest, besides fixing 2), and possibly also handling the one more case in 
> 1) which Dirk missed, to apply also the attached patch. I tested with 
> khtmltests/ecma/events_document.html , and modified it a bit also to see the 
> full sequence, and it generates "keydown,keypress,keyup" for single 
> press+release, and "keydown, keypress repeatedly,keyup" for holding down a 
> key.
Sounds right.

Only minor things:

About the TextEventImpl change: I wouldn't add an assert at this point in the
release cycle.... You never know. Make it Q_ASSERT if you want, but don't
let it crash on users because of some unexpected circumstances.

-  else if (key->type() == QEvent::KeyPress)
+  else
I would leave a mention of KeyPress, at least as a comment, to keep the code readable.
This else is only going to be hit with KeyPress, right?

Please commit.
Thanks.

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list