summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wildemann <gta04@metalstrolche.de>2017-01-25 23:48:36 +0100
committerStefan Wildemann <gta04@metalstrolche.de>2017-02-04 20:03:52 +0100
commitbd0092f3f6b30659a16cb19c3f468b6a8e3a0c21 (patch)
treec7b4127fd87ee77daaae524681ccf1ee78042e87
parent164d8fb02da84a41d8ae876ecdf9f1c57a1b8257 (diff)
downloadnavit-bd0092f3f6b30659a16cb19c3f468b6a8e3a0c21.tar.gz
Fix: Qt5: integer to pinter cast as suggested by GLib
-rw-r--r--navit/graphics/qt5/event_qt5.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/navit/graphics/qt5/event_qt5.cpp b/navit/graphics/qt5/event_qt5.cpp
index 400daf9e0..9cea3d921 100644
--- a/navit/graphics/qt5/event_qt5.cpp
+++ b/navit/graphics/qt5/event_qt5.cpp
@@ -61,15 +61,15 @@ void qt5_navit_timer :: timerEvent (QTimerEvent * event)
int id=event->timerId();
void* multi = NULL;
// dbg(lvl_debug, "TimerEvent (%d)\n", id);
- struct callback *cb=(struct callback *)g_hash_table_lookup(timer_callback, (void *)id);
+ struct callback *cb=(struct callback *)g_hash_table_lookup(timer_callback, (void *)(long)id);
if (cb)
callback_call_0(cb);
/* remove timer if it was oneshot timer */
- if (g_hash_table_lookup_extended(timer_type, (void *)id, NULL, &multi))
+ if (g_hash_table_lookup_extended(timer_type, (void *)(long)id, NULL, &multi))
{
/* it's still in the list */
- if(((int)multi) == 0)
- event_qt5_remove_timeout((struct event_timeout *)id);
+ if(((int)(long)multi) == 0)
+ event_qt5_remove_timeout((struct event_timeout *)(long)id);
}
// dbg(lvl_debug, "TimerEvent (%d) leave\n", id);
}
@@ -122,9 +122,9 @@ event_qt5_add_timeout(int timeout, int multi, struct callback *cb)
dbg(lvl_debug,"add timeout %d, mul %d, %p ==",timeout, multi, cb);
id=qt5_timer->startTimer(timeout);
dbg(lvl_debug,"%d\n", id);
- g_hash_table_insert(qt5_timer->timer_callback, (void *)id, cb);
- g_hash_table_insert(qt5_timer->timer_type, (void *)id, (void *)!!multi);
- return (struct event_timeout *)id;
+ g_hash_table_insert(qt5_timer->timer_callback, (void *)(long)id, cb);
+ g_hash_table_insert(qt5_timer->timer_type, (void *)(long)id, (void *)(long)!!multi);
+ return (struct event_timeout *)(long)id;
}
static void