summaryrefslogtreecommitdiff
path: root/noncore/apps/keyz-cfg
authoralwin <alwin>2004-02-26 16:46:05 (UTC)
committer alwin <alwin>2004-02-26 16:46:05 (UTC)
commit15f4596df91110689176fb3b76a4fcf6663c1c09 (patch) (unidiff)
treefe9fcef4baf851b13427cc06b7b2b6b83b5adb5e /noncore/apps/keyz-cfg
parent89cbb91c0217a1ba0480c23e8ef14221975f04e2 (diff)
downloadopie-15f4596df91110689176fb3b76a4fcf6663c1c09.zip
opie-15f4596df91110689176fb3b76a4fcf6663c1c09.tar.gz
opie-15f4596df91110689176fb3b76a4fcf6663c1c09.tar.bz2
forgot remove some ifdefs
Diffstat (limited to 'noncore/apps/keyz-cfg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/keyz-cfg/zkbnames.cpp3
-rw-r--r--noncore/apps/keyz-cfg/zkbnames.h4
-rw-r--r--noncore/apps/keyz-cfg/zkbxml.cpp14
3 files changed, 0 insertions, 21 deletions
diff --git a/noncore/apps/keyz-cfg/zkbnames.cpp b/noncore/apps/keyz-cfg/zkbnames.cpp
index fec3a2e..c20a114 100644
--- a/noncore/apps/keyz-cfg/zkbnames.cpp
+++ b/noncore/apps/keyz-cfg/zkbnames.cpp
@@ -1,8 +1,6 @@
1#ifdef USE_ZKB_NAMES
2
3#include <qmap.h> 1#include <qmap.h>
4#include <qstring.h> 2#include <qstring.h>
5 3
6#include "zkbnames.h" 4#include "zkbnames.h"
7 5
8QString Null_String((const char*) 0); 6QString Null_String((const char*) 0);
@@ -444,7 +442,6 @@ const QString& KeycodeNames::find(int k) {
444 return Null_String; 442 return Null_String;
445 } else { 443 } else {
446 return it.data(); 444 return it.data();
447 } 445 }
448} 446}
449 447
450#endif
diff --git a/noncore/apps/keyz-cfg/zkbnames.h b/noncore/apps/keyz-cfg/zkbnames.h
index 58462ff..0d1e7f5 100644
--- a/noncore/apps/keyz-cfg/zkbnames.h
+++ b/noncore/apps/keyz-cfg/zkbnames.h
@@ -1,11 +1,9 @@
1#ifndef ZKBNAMES_H 1#ifndef ZKBNAMES_H
2#define ZKBNAMES_H 2#define ZKBNAMES_H
3 3
4#ifdef USE_ZKB_NAMES
5
6#include <qstring.h> 4#include <qstring.h>
7 5
8class KeyNames { 6class KeyNames {
9public: 7public:
10 static int find(const QString& key); 8 static int find(const QString& key);
11 static const QString& find(int); 9 static const QString& find(int);
@@ -19,9 +17,7 @@ public:
19 17
20class ModifierNames { 18class ModifierNames {
21public: 19public:
22 static int find(const QString& key); 20 static int find(const QString& key);
23 static const QString& find(int); 21 static const QString& find(int);
24}; 22};
25
26#endif
27#endif 23#endif
diff --git a/noncore/apps/keyz-cfg/zkbxml.cpp b/noncore/apps/keyz-cfg/zkbxml.cpp
index 76472cb..5b0084c 100644
--- a/noncore/apps/keyz-cfg/zkbxml.cpp
+++ b/noncore/apps/keyz-cfg/zkbxml.cpp
@@ -486,29 +486,23 @@ void ZkbXmlHandler::setError(const QString& e) {
486 err = e; 486 err = e;
487} 487}
488 488
489int ZkbXmlHandler::str2key(const QString& s) { 489int ZkbXmlHandler::str2key(const QString& s) {
490 int ret; 490 int ret;
491 491
492#ifdef USE_ZKB_NAMES
493 ret = KeyNames::find(s); 492 ret = KeyNames::find(s);
494 if (ret == -1) { 493 if (ret == -1) {
495 setError("Invalid value: " + s); 494 setError("Invalid value: " + s);
496 } 495 }
497 496
498#else
499 ret = str2uint(s);
500#endif
501
502 return ret; 497 return ret;
503} 498}
504 499
505int ZkbXmlHandler::str2modifier(const QString& val) { 500int ZkbXmlHandler::str2modifier(const QString& val) {
506 int ret; 501 int ret;
507 502
508#ifdef USE_ZKB_NAMES
509 int n, i; 503 int n, i;
510 ret = 0; 504 ret = 0;
511 n = 0; 505 n = 0;
512 do { 506 do {
513 i = val.find('|', n); 507 i = val.find('|', n);
514 if (i < 0) { 508 if (i < 0) {
@@ -523,15 +517,12 @@ int ZkbXmlHandler::str2modifier(const QString& val) {
523 return -1; 517 return -1;
524 } 518 }
525 519
526 ret |= v; 520 ret |= v;
527 n = i + 1; 521 n = i + 1;
528 } while (n < val.length()); 522 } while (n < val.length());
529#else
530 ret = str2uint(val);
531#endif
532 523
533 return ret; 524 return ret;
534} 525}
535 526
536bool ZkbXmlHandler::str2bool(const QString& s) { 527bool ZkbXmlHandler::str2bool(const QString& s) {
537 if (s == "true") { 528 if (s == "true") {
@@ -545,22 +536,17 @@ int ZkbXmlHandler::str2unicode(const QString& s) {
545 return str2uint(s); 536 return str2uint(s);
546} 537}
547 538
548int ZkbXmlHandler::str2keycode(const QString& s) { 539int ZkbXmlHandler::str2keycode(const QString& s) {
549 int ret; 540 int ret;
550 541
551#ifdef USE_ZKB_NAMES
552 ret = KeycodeNames::find(s); 542 ret = KeycodeNames::find(s);
553 if (ret == -1) { 543 if (ret == -1) {
554 setError("Invalid value: " + s); 544 setError("Invalid value: " + s);
555 } 545 }
556 546
557#else
558 ret = str2uint(s);
559#endif
560
561 return ret; 547 return ret;
562} 548}
563 549
564int ZkbXmlHandler::str2uint(const QString& s) { 550int ZkbXmlHandler::str2uint(const QString& s) {
565 int ret; 551 int ret;
566 bool ok; 552 bool ok;