summaryrefslogtreecommitdiff
path: root/noncore/apps/keyz-cfg/zkb.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/keyz-cfg/zkb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/keyz-cfg/zkb.cpp4
1 files changed, 2 insertions, 2 deletions
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
@@ -343,49 +343,49 @@ QStringList Keymap::listLabels() {
return ret;
}
State* Keymap::getStateByLabel(const QString& label) {
QMap<QString, QString>::Iterator lit = labels.find(label);
State* state = 0;
if (lit == labels.end()) {
return 0;
}
QString name = lit.data();
int n = name.find(":*");
if (n>=0 && n==(int)(name.length()-2)) {
name=name.left(name.length() - 1);
n = currentStateName.findRev(":");
if (n >= 0) {
name += currentStateName.mid(n+1);
}
}
-// qDebug("look for: %s\n", (const char*) name.utf8());
+// odebug << "look for: " << (const char*) name.utf8() << "\n" << oendl;
QMap<QString, State*>::Iterator sit = states.find(name);
if (sit != states.end()) {
state = sit.data();
}
return state;
}
bool Keymap::addState(const QString& name, State* state) {
if (states.find(name) != states.end()) {
return false;
}
states.insert(name, state);
lsmapInSync = false;
if (currentState == 0) {
setCurrentState(state);
}
return true;
}
State* Keymap::getCurrentState() const {
@@ -395,49 +395,49 @@ State* Keymap::getCurrentState() const {
QString Keymap::getCurrentLabel() {
return currentLabel;
}
bool Keymap::setCurrentState(State* state) {
QMap<QString, State*>::Iterator it;
for(it = states.begin(); it != states.end(); ++it) {
State* s = it.data();
if (s == state) {
currentState = s;
currentStateName = it.key();
qDebug("state changed: %s\n", (const char*)
currentStateName.utf8());
if (!lsmapInSync) {
generateLabelStateMaps();
}
QMap<State*, QString>::Iterator tit;
tit = stateLabelMap.find(state);
if (tit != stateLabelMap.end()) {
currentLabel = tit.data();
} else {
-// qDebug("no label for: " + currentStateName + "\n");
+// odebug << "no label for: " + currentStateName + "\n" << oendl;
currentLabel = "";
}
return true;
}
}
return false;
}
bool Keymap::removeState(const QString& name, bool force) {
QMap<QString, State*>::Iterator it = states.find(name);
if (it == states.end()) {
return false;
}
State* state = it.data();
QList<Action> acts = findStateUsage(state);
if (!acts.isEmpty()) {
if (!force) {
return false;
} else {