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

List:       kde-core-devel
Subject:    Re: KLineEdit::keyPressEvent() reading from config
From:       Carsten Pfeiffer <carpdjih () cetus ! zrz ! tu-berlin ! de>
Date:       2001-11-25 3:12:57
[Download RAW message or body]

On Saturday 24 November 2001 19:12, Ellis Whitehead wrote:

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

ugh.

> 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

What about doing this in KStdAccel, and not in every place it is used?

PS: the problems in the "Configure Key Bindings" dialogs persist. Every item 
is set to "Unset". I'm running into the following "TODO":

QString KKeySequence::toString( KKeySequence::I18N bi18n ) const
[...]
       // TODO: calculate X codes from Qt codes if they are not already set.
        if( m_keyMod == -1 )
                return (bi18n) ? i18n("Unknown Key", "Unset") : 
QString("Unset");

The KActions set m_keyMod to -1 and m_keySym et al to 0 and somehow they're 
not set anywhere.

Cheers
Carsten Pfeiffer

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

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