Diffstat (limited to 'noncore/apps/opie-console/keytrans.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/keytrans.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/keytrans.cpp b/noncore/apps/opie-console/keytrans.cpp index d569ae0..5ea192e 100644 --- a/noncore/apps/opie-console/keytrans.cpp +++ b/noncore/apps/opie-console/keytrans.cpp | |||
@@ -618,36 +618,39 @@ KeyTransSymbols::KeyTransSymbols() | |||
618 | defKeySyms(); | 618 | defKeySyms(); |
619 | } | 619 | } |
620 | 620 | ||
621 | // Global material ----------------------------------------------------------- | 621 | // Global material ----------------------------------------------------------- |
622 | 622 | ||
623 | static int keytab_serial = 0; //FIXME: remove,localize | 623 | static int keytab_serial = 0; //FIXME: remove,localize |
624 | 624 | ||
625 | static QIntDict<KeyTrans> * numb2keymap = 0L; | 625 | static QIntDict<KeyTrans> * numb2keymap = 0L; |
626 | static QDict<KeyTrans> * path2keymap = 0L; | 626 | static QDict<KeyTrans> * path2keymap = 0L; |
627 | 627 | ||
628 | KeyTrans* KeyTrans::find(int numb) | 628 | KeyTrans* KeyTrans::find(int numb) |
629 | { | 629 | { |
630 | loadAll(); | ||
630 | KeyTrans* res = numb2keymap->find(numb); | 631 | KeyTrans* res = numb2keymap->find(numb); |
631 | return res ? res : numb2keymap->find(0); | 632 | return res ? res : numb2keymap->find(0); |
632 | } | 633 | } |
633 | 634 | ||
634 | KeyTrans* KeyTrans::find(const char* path) | 635 | KeyTrans* KeyTrans::find(const char* path) |
635 | { | 636 | { |
637 | loadAll(); | ||
636 | KeyTrans* res = path2keymap->find(path); | 638 | KeyTrans* res = path2keymap->find(path); |
637 | return res ? res : numb2keymap->find(0); | 639 | return res ? res : numb2keymap->find(0); |
638 | } | 640 | } |
639 | 641 | ||
640 | int KeyTrans::count() | 642 | int KeyTrans::count() |
641 | { | 643 | { |
644 | loadAll(); | ||
642 | return numb2keymap->count(); | 645 | return numb2keymap->count(); |
643 | } | 646 | } |
644 | 647 | ||
645 | void KeyTrans::addKeyTrans() | 648 | void KeyTrans::addKeyTrans() |
646 | { | 649 | { |
647 | this->numb = keytab_serial ++; | 650 | this->numb = keytab_serial ++; |
648 | numb2keymap->insert(numb,this); | 651 | numb2keymap->insert(numb,this); |
649 | path2keymap->insert(path,this); | 652 | path2keymap->insert(path,this); |
650 | } | 653 | } |
651 | 654 | ||
652 | void KeyTrans::loadAll() | 655 | void KeyTrans::loadAll() |
653 | { | 656 | { |