summaryrefslogtreecommitdiffhomepage
path: root/opentrack/keybinding-worker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-11-26 09:04:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-11-26 09:05:13 +0100
commit3566dc23946b798b396946297cbf70f2d46fd242 (patch)
treef9f23f4a0ac5c5a71b1166dd54f048f68e952b7a /opentrack/keybinding-worker.cpp
parente8c5d0cde6676c7924c92cd43ac36588a401c8e4 (diff)
api/shortcuts: move to separate definition
There's no need to have definitions in header for non-template classes
Diffstat (limited to 'opentrack/keybinding-worker.cpp')
-rw-r--r--opentrack/keybinding-worker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/opentrack/keybinding-worker.cpp b/opentrack/keybinding-worker.cpp
index dcf5c1b6..59bc4afd 100644
--- a/opentrack/keybinding-worker.cpp
+++ b/opentrack/keybinding-worker.cpp
@@ -14,6 +14,15 @@
#include <QDebug>
#include <QMutexLocker>
+bool Key::should_process()
+{
+ if (keycode == 0 && guid == "")
+ return false;
+ bool ret = timer.elapsed_ms() > 100;
+ timer.start();
+ return ret;
+}
+
KeybindingWorker::~KeybindingWorker() {
qDebug() << "keybinding worker stop";
should_quit = true;
@@ -172,6 +181,7 @@ void KeybindingWorker::remove_receiver(KeybindingWorker::fun* pos)
ok = true;
qDebug() << "remove receiver" << (long) pos;
receivers.erase(receivers.begin() + i);
+ break;
}
}
if (!ok)