summaryrefslogtreecommitdiff
path: root/noncore/apps/keyz-cfg
Unidiff
Diffstat (limited to 'noncore/apps/keyz-cfg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/keyz-cfg/cfgfile.cpp12
-rw-r--r--noncore/apps/keyz-cfg/config.in2
-rw-r--r--noncore/apps/keyz-cfg/keyz-cfg.pro16
-rw-r--r--noncore/apps/keyz-cfg/zkb.cpp4
-rw-r--r--noncore/apps/keyz-cfg/zkbcfg.cpp15
5 files changed, 29 insertions, 20 deletions
diff --git a/noncore/apps/keyz-cfg/cfgfile.cpp b/noncore/apps/keyz-cfg/cfgfile.cpp
index b0dc968..81d1ee1 100644
--- a/noncore/apps/keyz-cfg/cfgfile.cpp
+++ b/noncore/apps/keyz-cfg/cfgfile.cpp
@@ -1,6 +1,12 @@
1#include <qmessagebox.h>
2#include "cfgfile.h" 1#include "cfgfile.h"
3 2
3/* OPIE */
4#include <opie2/odebug.h>
5using namespace Opie::Core;
6
7/* QT */
8#include <qmessagebox.h>
9
4// CfgEntry implementation 10// CfgEntry implementation
5CfgEntry::CfgEntry() { 11CfgEntry::CfgEntry() {
6} 12}
@@ -95,7 +101,7 @@ bool CfgParser::load(QString file, CfgFile& cfg) {
95 reader.parse(is); 101 reader.parse(is);
96 102
97 if (!err.isEmpty()) { 103 if (!err.isEmpty()) {
98 qDebug(err); 104 odebug << err << oendl;
99 return false; 105 return false;
100 } 106 }
101 107
@@ -106,7 +112,7 @@ bool CfgParser::load(QString file, CfgFile& cfg) {
106 QString prefix = fit.data(); 112 QString prefix = fit.data();
107 QString label = ""; 113 QString label = "";
108 114
109 qDebug("include: file=" + fit.key() + ", prefix=" + fit.data()); 115 odebug << "include: file=" + fit.key() + ", prefix=" + fit.data() << oendl;
110 lit = labels.find(prefix+":*"); 116 lit = labels.find(prefix+":*");
111 if (lit != labels.end()) { 117 if (lit != labels.end()) {
112 label = lit.data(); 118 label = lit.data();
diff --git a/noncore/apps/keyz-cfg/config.in b/noncore/apps/keyz-cfg/config.in
index 29a10f5..8e1be2d 100644
--- a/noncore/apps/keyz-cfg/config.in
+++ b/noncore/apps/keyz-cfg/config.in
@@ -1,4 +1,4 @@
1 config KEYZCFG 1 config KEYZCFG
2 boolean "keyz-cfg (configuration tool for keyz applet)" 2 boolean "keyz-cfg (configuration tool for keyz applet)"
3 default "n" 3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/noncore/apps/keyz-cfg/keyz-cfg.pro b/noncore/apps/keyz-cfg/keyz-cfg.pro
index 44bbb5f..7ac604b 100644
--- a/noncore/apps/keyz-cfg/keyz-cfg.pro
+++ b/noncore/apps/keyz-cfg/keyz-cfg.pro
@@ -2,23 +2,23 @@ TEMPLATE = app
2DESTDIR = $(OPIEDIR)/bin 2DESTDIR = $(OPIEDIR)/bin
3 CONFIG = qt warn_on 3 CONFIG = qt warn_on
4 HEADERS = zkb.h \ 4 HEADERS = zkb.h \
5 zkbcfg.h \ 5 zkbcfg.h \
6 zkbnames.h \ 6 zkbnames.h \
7 zkbxml.h \ 7 zkbxml.h \
8 cfgdlg.h \ 8 cfgdlg.h \
9 cfgfile.h 9 cfgfile.h
10 10
11 SOURCES = main.cpp \ 11 SOURCES = main.cpp \
12 cfgdlg.cpp \ 12 cfgdlg.cpp \
13 cfgfile.cpp \ 13 cfgfile.cpp \
14 zkb.cpp \ 14 zkb.cpp \
15 zkbcfg.cpp \ 15 zkbcfg.cpp \
16 zkbnames.cpp \ 16 zkbnames.cpp \
17 zkbxml.cpp 17 zkbxml.cpp
18 18
19INCLUDEPATH += $(OPIEDIR)/include 19INCLUDEPATH += $(OPIEDIR)/include
20DEPENDPATH += $(OPIEDIR)/include 20DEPENDPATH += $(OPIEDIR)/include
21 LIBS += -lqpe 21 LIBS += -lqpe -lopiecore2
22 TARGET = keyz-cfg 22 TARGET = keyz-cfg
23 23
24include ( $(OPIEDIR)/include.pro ) 24include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/keyz-cfg/zkb.cpp b/noncore/apps/keyz-cfg/zkb.cpp
index f315d4b..8382615 100644
--- a/noncore/apps/keyz-cfg/zkb.cpp
+++ b/noncore/apps/keyz-cfg/zkb.cpp
@@ -364,7 +364,7 @@ State* Keymap::getStateByLabel(const QString& label) {
364 } 364 }
365 } 365 }
366 366
367 //qDebug("look for: %s\n", (const char*) name.utf8()); 367 //odebug << "look for: " << (const char*) name.utf8() << "\n" << oendl;
368 QMap<QString, State*>::Iterator sit = states.find(name); 368 QMap<QString, State*>::Iterator sit = states.find(name);
369 if (sit != states.end()) { 369 if (sit != states.end()) {
370 state = sit.data(); 370 state = sit.data();
@@ -416,7 +416,7 @@ bool Keymap::setCurrentState(State* state) {
416 if (tit != stateLabelMap.end()) { 416 if (tit != stateLabelMap.end()) {
417 currentLabel = tit.data(); 417 currentLabel = tit.data();
418 } else { 418 } else {
419 // qDebug("no label for: " + currentStateName + "\n"); 419 // odebug << "no label for: " + currentStateName + "\n" << oendl;
420 currentLabel = ""; 420 currentLabel = "";
421 } 421 }
422 422
diff --git a/noncore/apps/keyz-cfg/zkbcfg.cpp b/noncore/apps/keyz-cfg/zkbcfg.cpp
index 0992b9a..f1d53ba 100644
--- a/noncore/apps/keyz-cfg/zkbcfg.cpp
+++ b/noncore/apps/keyz-cfg/zkbcfg.cpp
@@ -1,7 +1,11 @@
1#include <qfileinfo.h>
2
3#include "zkbcfg.h" 1#include "zkbcfg.h"
4 2
3/* OPIE */
4#include <opie2/odebug.h>
5using namespace Opie::Core;
6
7/* QT */
8#include <qfileinfo.h>
5 9
6// Implementation of XkbConfig class 10// Implementation of XkbConfig class
7ZkbConfig::ZkbConfig(const QString& dir):path(dir) { 11ZkbConfig::ZkbConfig(const QString& dir):path(dir) {
@@ -15,7 +19,7 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix)
15 QFile f(path+"/"+file); 19 QFile f(path+"/"+file);
16 QFileInfo fi(f); 20 QFileInfo fi(f);
17 21
18 qDebug("start loading file=%s\n", (const char*) file.utf8()); 22 odebug << "start loading file=" << (const char*) file.utf8() << "\n" << oendl;
19 if (includedFiles.find(fi.absFilePath()) != includedFiles.end()) { 23 if (includedFiles.find(fi.absFilePath()) != includedFiles.end()) {
20 return false; 24 return false;
21 } 25 }
@@ -30,8 +34,7 @@ bool ZkbConfig::load(const QString& file, Keymap& keymap, const QString& prefix)
30 ret = reader.parse(is); 34 ret = reader.parse(is);
31 includedFiles.remove(fi.absFilePath()); 35 includedFiles.remove(fi.absFilePath());
32 36
33 qDebug("end loading file=%s : status=%s\n", (const char*) file.utf8(), 37 odebug << "end loading file=" << file.utf8() << ": status=" << err.utf8() << oendl;
34 (const char*) err.utf8());
35 return ret; 38 return ret;
36} 39}
37 40
@@ -122,7 +125,7 @@ bool ZkbHandler::startStateElement(const QString& name,
122 currentStateName = prefix + name; 125 currentStateName = prefix + name;
123 currentState = keymap.getStateByName(currentStateName); 126 currentState = keymap.getStateByName(currentStateName);
124 127
125 //qDebug("state name=%s\n", (const char*) currentStateName.utf8()); 128 //odebug << "state name=" << (const char*) currentStateName.utf8() << "\n" << oendl;
126 129
127 State* parent = 0; 130 State* parent = 0;
128 if (!parentName.isEmpty()) { 131 if (!parentName.isEmpty()) {