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

List:       kde-core-devel
Subject:    KLineEdit::keyPressEvent() reading from config
From:       Ellis Whitehead <kde () ellisw ! net>
Date:       2001-11-24 17:09:39
[Download RAW message or body]

Hi,

Every time a key is pressed in a KLineEdit widget, KStdAccel::key() is called 
about 7 times.  Each KStdAccel::key() call reads from the global config and 
makes somewhat expensive string->key conversion calls.  Might it be that 
KLineEdit would be more responsive when the computer is on high load if we 
weren't doing this for every key press? [I haven't done any 
testing]

What I'm thinking is that the keys could be read in once upon widget creation 
and stored in static variables.  Disadvantage: If the standard key bindings 
are changed during program execution, any existing KLineEdit boxes would 
retain the old settings until a new KLineEdit box was created in the same 
process.

Is there a way that individual widgets could be informed when the standard 
key settings are changed?  For example, there could be a general dcop message 
"thing-X reconfigured" sent from a kcontrol module, and then any DCOP 
applications could emit an appropriate signal, such as 
reconfiguredShortcuts() or reconfiguredFonts() or reconfiguredSound(), or 
perhaps rather reconfigure( int code ). These signals could be connected to 
by any widgets that were interested?

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

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