summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/okeyconfigmanager.cpp4
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
@@ -496,25 +496,25 @@ OKeyConfigManager::~OKeyConfigManager() {
496 delete m_map; 496 delete m_map;
497} 497}
498 498
499/** 499/**
500 * Load the Configuration from the OConfig 500 * Load the Configuration from the OConfig
501 * If a Key is restricted but was in the config we will 501 * If a Key is restricted but was in the config we will
502 * make it be the empty key paur 502 * make it be the empty key paur
503 * We will change the group but restore to the previous. 503 * We will change the group but restore to the previous.
504 * 504 *
505 * @see OKeyPair::emptyKey 505 * @see OKeyPair::emptyKey
506 */ 506 */
507void OKeyConfigManager::load() { 507void OKeyConfigManager::load() {
508 Opie::Core::OConfigGroupSaver( m_conf, m_group ); 508 Opie::Core::OConfigGroupSaver grp( m_conf, m_group );
509 509
510 /* 510 /*
511 * Read each item 511 * Read each item
512 */ 512 */
513 int key, mod; 513 int key, mod;
514 for( OKeyConfigItem::List::Iterator it = m_keys.begin(); it != m_keys.end(); ++it ) { 514 for( OKeyConfigItem::List::Iterator it = m_keys.begin(); it != m_keys.end(); ++it ) {
515 key = m_conf->readNumEntry( (*it).configKey()+"key", 515 key = m_conf->readNumEntry( (*it).configKey()+"key",
516 (*it).defaultKeyPair().keycode() ); 516 (*it).defaultKeyPair().keycode() );
517 mod = m_conf->readNumEntry( (*it).configKey()+"mod", 517 mod = m_conf->readNumEntry( (*it).configKey()+"mod",
518 (*it).defaultKeyPair().modifier() ); 518 (*it).defaultKeyPair().modifier() );
519 OKeyPair okey( key, mod ); 519 OKeyPair okey( key, mod );
520 520
@@ -523,25 +523,25 @@ void OKeyConfigManager::load() {
523 else 523 else
524 (*it).setKeyPair( OKeyPair::emptyKey() ); 524 (*it).setKeyPair( OKeyPair::emptyKey() );
525 } 525 }
526 delete m_map; m_map = 0; 526 delete m_map; m_map = 0;
527} 527}
528 528
529/** 529/**
530 * We will save the current configuration 530 * We will save the current configuration
531 * to the OConfig. We will change the group but restore 531 * to the OConfig. We will change the group but restore
532 * to the previous 532 * to the previous
533 */ 533 */
534void OKeyConfigManager::save() { 534void OKeyConfigManager::save() {
535 Opie::Core::OConfigGroupSaver( m_conf, m_group ); 535 Opie::Core::OConfigGroupSaver grp( m_conf, m_group );
536 536
537 /* 537 /*
538 * Write each item 538 * Write each item
539 */ 539 */
540 for( OKeyConfigItem::List::Iterator it = m_keys.begin();it != m_keys.end(); ++it ) { 540 for( OKeyConfigItem::List::Iterator it = m_keys.begin();it != m_keys.end(); ++it ) {
541 /* skip empty items */ 541 /* skip empty items */
542 if ( (*it).isEmpty() ) 542 if ( (*it).isEmpty() )
543 continue; 543 continue;
544 OKeyPair pair = (*it).keyPair(); 544 OKeyPair pair = (*it).keyPair();
545 OKeyPair deft = (*it).defaultKeyPair(); 545 OKeyPair deft = (*it).defaultKeyPair();
546 /* 546 /*
547 * don't write if it is the default setting 547 * don't write if it is the default setting