-rw-r--r-- | libopie2/opiecore/okeyconfigmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/okeyconfigmanager.cpp b/libopie2/opiecore/okeyconfigmanager.cpp index ad0f7f7..ccb96cc 100644 --- a/libopie2/opiecore/okeyconfigmanager.cpp +++ b/libopie2/opiecore/okeyconfigmanager.cpp @@ -484,76 +484,76 @@ OKeyConfigManager::OKeyConfigManager( Opie::Core::OConfig* conf, if ( m_grab ) QPEApplication::grabKeyboard(); m_event_mask = OKeyConfigManager::MaskReleased; } /** * Destructor */ OKeyConfigManager::~OKeyConfigManager() { if ( m_grab ) QPEApplication::ungrabKeyboard(); delete m_map; } /** * Load the Configuration from the OConfig * If a Key is restricted but was in the config we will * make it be the empty key paur * We will change the group but restore to the previous. * * @see OKeyPair::emptyKey */ void OKeyConfigManager::load() { - Opie::Core::OConfigGroupSaver( m_conf, m_group ); + Opie::Core::OConfigGroupSaver grp( m_conf, m_group ); /* * Read each item */ int key, mod; for( OKeyConfigItem::List::Iterator it = m_keys.begin(); it != m_keys.end(); ++it ) { key = m_conf->readNumEntry( (*it).configKey()+"key", (*it).defaultKeyPair().keycode() ); mod = m_conf->readNumEntry( (*it).configKey()+"mod", (*it).defaultKeyPair().modifier() ); OKeyPair okey( key, mod ); if ( !m_blackKeys.contains( okey ) && key != -1 && mod != -1 ) (*it).setKeyPair( okey ); else (*it).setKeyPair( OKeyPair::emptyKey() ); } delete m_map; m_map = 0; } /** * We will save the current configuration * to the OConfig. We will change the group but restore * to the previous */ void OKeyConfigManager::save() { - Opie::Core::OConfigGroupSaver( m_conf, m_group ); + Opie::Core::OConfigGroupSaver grp( m_conf, m_group ); /* * Write each item */ for( OKeyConfigItem::List::Iterator it = m_keys.begin();it != m_keys.end(); ++it ) { /* skip empty items */ if ( (*it).isEmpty() ) continue; OKeyPair pair = (*it).keyPair(); OKeyPair deft = (*it).defaultKeyPair(); /* * don't write if it is the default setting * FIXME allow to remove Keys from config if ( (pair.keycode() == deft.keycode()) && (pair.modifier()== deft.modifier() ) ) return; */ m_conf->writeEntry((*it).configKey()+"key", pair.keycode() ); m_conf->writeEntry((*it).configKey()+"mod", pair.modifier() ); } m_conf->write(); } |