diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 7184db84fa..688cd75e29 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h @@ -121,7 +121,7 @@ public: void registerSocketNotifier(QSocketNotifier *notifier); void unregisterSocketNotifier(QSocketNotifier *notifier); - void registerTimer(int timerId, int interval, QObject *object); + void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object); bool unregisterTimer(int timerId); bool unregisterTimers(QObject *object); QList<TimerInfo> registeredTimers(QObject *object) const; @@ -137,6 +137,7 @@ private: struct MacTimerInfo { int id; int interval; + Qt::TimerType timerType; QObject *obj; bool pending; CFRunLoopTimerRef runLoopTimer; diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index 8cdf40be78..d55b28ffcc 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -139,7 +139,7 @@ void QCocoaEventDispatcherPrivate::activateTimer(CFRunLoopTimerRef, void *info) } -void QCocoaEventDispatcher::registerTimer(int timerId, int interval, QObject *obj) +void QCocoaEventDispatcher::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *obj) { #ifndef QT_NO_DEBUG if (timerId < 1 || interval < 0 || !obj) { @@ -154,6 +154,7 @@ void QCocoaEventDispatcher::registerTimer(int timerId, int interval, QObject *ob MacTimerInfo *t = new MacTimerInfo(); t->id = timerId; t->interval = interval; + t->timerType = timerType; t->obj = obj; t->runLoopTimer = 0; t->pending = false; @@ -241,7 +242,7 @@ QCocoaEventDispatcher::registeredTimers(QObject *object) const while (it != QCocoaEventDispatcherPrivate::macTimerHash.constEnd()) { MacTimerInfo *t = it.value(); if (t->obj == object) - list << TimerInfo(t->id, t->interval); + list << TimerInfo(t->id, t->interval, t->timerType); ++it; } return list; |