summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2017-12-20 12:35:41 -0800
committerPierre Grandin <grandinp@gmail.com>2017-12-25 17:21:17 -0800
commit98439964241e947725ae76e32b9368e729e6621d (patch)
treef94356c88668f6dd01ab6a74e0e0527e4515aaf1
parent2965884a4227f0437d384a86facc6d2a9dcc4c74 (diff)
downloadnavit-98439964241e947725ae76e32b9368e729e6621d.tar.gz
Fix:add missing watchEvent slot implementation
-rw-r--r--navit/graphics/qt5/event_qt5.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/navit/graphics/qt5/event_qt5.cpp b/navit/graphics/qt5/event_qt5.cpp
index 5eae821f6..08fb6e525 100644
--- a/navit/graphics/qt5/event_qt5.cpp
+++ b/navit/graphics/qt5/event_qt5.cpp
@@ -43,6 +43,7 @@ extern "C" {
#if defined(WINDOWS) || defined(WIN32) || defined(HAVE_API_WIN32_CE)
#include <windows.h>
#endif
+
#include "event_qt5.h"
#include "event_qt5.moc"
#include "graphics_qt5.h"
@@ -65,6 +66,16 @@ qt5_navit_timer::qt5_navit_timer(QObject* parent)
dbg(lvl_debug, "qt5_navit_timer object created\n");
}
+void qt5_navit_timer::watchEvent(int id)
+{
+ struct event_watch* ret = g_new0(struct event_watch, 1);
+ ret = (struct event_watch*)g_hash_table_lookup(watches, (void*)(long)id);
+ if (ret) {
+ dbg(lvl_debug, "callback found, calling it\n");
+ callback_call_0(ret->cb);
+ }
+}
+
void qt5_navit_timer::timerEvent(QTimerEvent* event)
{
int id = event->timerId();