From 2bbf9befd8879dcfca9f48ac9ac13daf40f48847 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 21 Dec 2011 11:33:33 +0100 Subject: [PATCH] Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer() ... and deprecate the old registerTimer() functions. The new pure- virtual registerTimer() breaks source-compatibility. Subclasses cannot be instantiated anymore, since the pure virtual function signature has changed. QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a struct with timerId, interval, and timerType members. This is a source incompatibility that should only affect subclasses of QAbstractEventDispatcher, which will need to pass 3 arguments to the TimerInfo constructor instead of 2. If the subclass used QPair instead of the TimerInfo typedef, the QPair declarations will need to be replaced with TimerInfo. Call the new registerTimer() function with the type from QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher to reimplement the new virtual function. The type argument is unused at the momemnt, except to ensure that registeredTimers() returns the type each timer was registered with. Implementations for the various dispatchers will be done in separate commits. Author: Thiago Macieira Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b Reviewed-by: Thiago Macieira --- dist/changes-5.0.0 | 12 ++++++++ src/corelib/kernel/qabstracteventdispatcher.cpp | 35 +++++++++++++++++----- src/corelib/kernel/qabstracteventdispatcher.h | 22 +++++++++++--- src/corelib/kernel/qeventdispatcher_glib.cpp | 4 +-- src/corelib/kernel/qeventdispatcher_glib_p.h | 2 +- src/corelib/kernel/qeventdispatcher_unix.cpp | 4 +-- src/corelib/kernel/qeventdispatcher_unix_p.h | 2 +- src/corelib/kernel/qeventdispatcher_win.cpp | 5 ++-- src/corelib/kernel/qeventdispatcher_win_p.h | 3 +- src/corelib/kernel/qobject.cpp | 12 ++++---- src/corelib/kernel/qtimerinfo_unix.cpp | 9 +++--- src/corelib/kernel/qtimerinfo_unix_p.h | 9 +++--- .../platforms/cocoa/qcocoaeventdispatcher.h | 3 +- .../platforms/cocoa/qcocoaeventdispatcher.mm | 5 ++-- .../qcoreapplication/tst_qcoreapplication.cpp | 2 +- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 2 +- .../tst_benchlibeventcounter.cpp | 3 +- .../benchliboptions/tst_benchliboptions.cpp | 3 +- 18 files changed, 92 insertions(+), 45 deletions(-) diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 159ef73..7f253a6 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -123,6 +123,18 @@ information about a particular change. - The previously exported function qt_translateRawTouchEvent() has been removed. Use QWindowSystemInterface::handleTouchEvent() instead. +- QAbstractEventDispatcher + + * The signature for the pure-virtual registerTimer() has changed. Subclasses + of QAbstractEventDispatcher will need to be updated to reimplement the new + pure-virtual 'virtual void registerTimer(int timerId, int interval, + Qt::TimerType timerType, QObject *object) = 0;' + + * QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is + now a struct with 3 members: struct TimerInfo { int timerId; int interval; + Qt::TimerType timerType; }; Reimplementations of + QAbstractEventDispatcher::registeredTimers() will need to be updated to pass + 3 arguments to the TimerInfo constructor (instead of 2). **************************************************************************** * General * diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index b936ac4..910b290 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -230,22 +230,39 @@ QAbstractEventDispatcher *QAbstractEventDispatcher::instance(QThread *thread) */ /*! + \obsolete + \fn int QAbstractEventDispatcher::registerTimer(int interval, QObject *object) - Registers a timer with the specified \a interval for the given \a object. + Registers a timer with the specified \a interval for the given \a object + and returns the timer id. +*/ + +/*! + \obsolete + + \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, QObject *object) + + Register a timer with the specified \a timerId and \a interval for the + given \a object. +*/ + +/*! + Registers a timer with the specified \a interval and \a timerType for the + given \a object and returns the timer id. */ -int QAbstractEventDispatcher::registerTimer(int interval, QObject *object) +int QAbstractEventDispatcher::registerTimer(int interval, Qt::TimerType timerType, QObject *object) { int id = QAbstractEventDispatcherPrivate::allocateTimerId(); - registerTimer(id, interval, object); + registerTimer(id, interval, timerType, object); return id; } /*! - \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, QObject *object) + \fn void QAbstractEventDispatcher::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) - Register a timer with the specified \a timerId and \a interval for - the given \a object. + Register a timer with the specified \a timerId, \a interval, and \a + timerType for the given \a object. */ /*! @@ -269,8 +286,10 @@ int QAbstractEventDispatcher::registerTimer(int interval, QObject *object) /*! \fn QList QAbstractEventDispatcher::registeredTimers(QObject *object) const - Returns a list of registered timers for \a object. The timer ID - is the first member in each pair; the interval is the second. + Returns a list of registered timers for \a object. The TimerInfo struct has + \c timerId, \c interval, and \c timerType members. + + \sa Qt::TimerType */ /*! \fn void QAbstractEventDispatcher::wakeUp() diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h index 36bd1be..0add7bc 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.h +++ b/src/corelib/kernel/qabstracteventdispatcher.h @@ -53,7 +53,6 @@ QT_MODULE(Core) class QAbstractEventDispatcherPrivate; class QSocketNotifier; -template struct QPair; class Q_CORE_EXPORT QAbstractEventDispatcher : public QObject { @@ -61,7 +60,16 @@ class Q_CORE_EXPORT QAbstractEventDispatcher : public QObject Q_DECLARE_PRIVATE(QAbstractEventDispatcher) public: - typedef QPair TimerInfo; + struct TimerInfo + { + int timerId; + int interval; + Qt::TimerType timerType; + + inline TimerInfo(int id, int i, Qt::TimerType t) + : timerId(id), interval(i), timerType(t) + { } + }; explicit QAbstractEventDispatcher(QObject *parent = 0); ~QAbstractEventDispatcher(); @@ -74,8 +82,14 @@ public: virtual void registerSocketNotifier(QSocketNotifier *notifier) = 0; virtual void unregisterSocketNotifier(QSocketNotifier *notifier) = 0; - int registerTimer(int interval, QObject *object); - virtual void registerTimer(int timerId, int interval, QObject *object) = 0; +#if QT_DEPRECATED_SINCE(5,0) + QT_DEPRECATED inline int registerTimer(int interval, QObject *object) + { return registerTimer(interval, Qt::CoarseTimer, object); } + QT_DEPRECATED inline void registerTimer(int timerId, int interval, QObject *object) + { registerTimer(timerId, interval, Qt::CoarseTimer, object); } +#endif + int registerTimer(int interval, Qt::TimerType timerType, QObject *object); + virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) = 0; virtual bool unregisterTimer(int timerId) = 0; virtual bool unregisterTimers(QObject *object) = 0; virtual QList registeredTimers(QObject *object) const = 0; diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 0773915..261d8d3 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -509,7 +509,7 @@ void QEventDispatcherGlib::unregisterSocketNotifier(QSocketNotifier *notifier) } } -void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *object) +void QEventDispatcherGlib::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) { #ifndef QT_NO_DEBUG if (timerId < 1 || interval < 0 || !object) { @@ -522,7 +522,7 @@ void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *obj #endif Q_D(QEventDispatcherGlib); - d->timerSource->timerList.registerTimer(timerId, interval, object); + d->timerSource->timerList.registerTimer(timerId, interval, timerType, object); } bool QEventDispatcherGlib::unregisterTimer(int timerId) diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h index 419f2f3..1c3b7e8 100644 --- a/src/corelib/kernel/qeventdispatcher_glib_p.h +++ b/src/corelib/kernel/qeventdispatcher_glib_p.h @@ -80,7 +80,7 @@ public: void registerSocketNotifier(QSocketNotifier *socketNotifier); void unregisterSocketNotifier(QSocketNotifier *socketNotifier); - 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 registeredTimers(QObject *object) const; diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 3420990..4b61667 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -330,7 +330,7 @@ int QEventDispatcherUNIX::select(int nfds, fd_set *readfds, fd_set *writefds, fd /*! \internal */ -void QEventDispatcherUNIX::registerTimer(int timerId, int interval, QObject *obj) +void QEventDispatcherUNIX::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *obj) { #ifndef QT_NO_DEBUG if (timerId < 1 || interval < 0 || !obj) { @@ -343,7 +343,7 @@ void QEventDispatcherUNIX::registerTimer(int timerId, int interval, QObject *obj #endif Q_D(QEventDispatcherUNIX); - d->timerList.registerTimer(timerId, interval, obj); + d->timerList.registerTimer(timerId, interval, timerType, obj); } /*! diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h index e96be68..07cbf92 100644 --- a/src/corelib/kernel/qeventdispatcher_unix_p.h +++ b/src/corelib/kernel/qeventdispatcher_unix_p.h @@ -111,7 +111,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 registeredTimers(QObject *object) const; diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index afee536..58a9279 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -859,7 +859,7 @@ void QEventDispatcherWin32::unregisterSocketNotifier(QSocketNotifier *notifier) d->doWsaAsyncSelect(sockfd); } -void QEventDispatcherWin32::registerTimer(int timerId, int interval, QObject *object) +void QEventDispatcherWin32::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) { if (timerId < 1 || interval < 0 || !object) { qWarning("QEventDispatcherWin32::registerTimer: invalid arguments"); @@ -875,6 +875,7 @@ void QEventDispatcherWin32::registerTimer(int timerId, int interval, QObject *ob t->dispatcher = this; t->timerId = timerId; t->interval = interval; + t->timerType = timerType; t->obj = object; t->inTimerEvent = false; t->fastTimerId = 0; @@ -953,7 +954,7 @@ QEventDispatcherWin32::registeredTimers(QObject *object) const for (int i = 0; i < d->timerVec.size(); ++i) { const WinTimerInfo *t = d->timerVec.at(i); if (t && t->obj == object) - list << TimerInfo(t->timerId, t->interval); + list << TimerInfo(t->timerId, t->interval, t->timerType); } return list; } diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h index 4a7aac0..300449d 100644 --- a/src/corelib/kernel/qeventdispatcher_win_p.h +++ b/src/corelib/kernel/qeventdispatcher_win_p.h @@ -84,7 +84,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 registeredTimers(QObject *object) const; @@ -120,6 +120,7 @@ struct WinTimerInfo { // internal timer info QObject *dispatcher; int timerId; int interval; + Qt::TimerType timerType; QObject *obj; // - object to receive events bool inTimerEvent; int fastTimerId; diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8db8ace..db2ab42 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1017,7 +1017,7 @@ bool QObject::event(QEvent *e) QThreadData *threadData = d->threadData; QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; if (eventDispatcher) { - QList > timers = eventDispatcher->registeredTimers(this); + QList timers = eventDispatcher->registeredTimers(this); if (!timers.isEmpty()) { // set inThreadChangeEvent to true to tell the dispatcher not to release out timer ids // back to the pool (since the timer ids are moving to a new thread). @@ -1025,7 +1025,7 @@ bool QObject::event(QEvent *e) eventDispatcher->unregisterTimers(this); d->inThreadChangeEvent = false; QMetaObject::invokeMethod(this, "_q_reregisterTimers", Qt::QueuedConnection, - Q_ARG(void*, (new QList >(timers)))); + Q_ARG(void*, (new QList(timers)))); } } break; @@ -1322,11 +1322,11 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData void QObjectPrivate::_q_reregisterTimers(void *pointer) { Q_Q(QObject); - QList > *timerList = reinterpret_cast > *>(pointer); + QList *timerList = reinterpret_cast *>(pointer); QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; for (int i = 0; i < timerList->size(); ++i) { - const QPair &pair = timerList->at(i); - eventDispatcher->registerTimer(pair.first, pair.second, q); + const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i); + eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q); } delete timerList; } @@ -1388,7 +1388,7 @@ int QObject::startTimer(int interval, Qt::TimerType timerType) qWarning("QObject::startTimer: QTimer can only be used with threads started with QThread"); return 0; } - return d->threadData->eventDispatcher->registerTimer(interval, this); + return d->threadData->eventDispatcher->registerTimer(interval, timerType, this); } /*! diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp index 0bb61de..8a0c6c5 100644 --- a/src/corelib/kernel/qtimerinfo_unix.cpp +++ b/src/corelib/kernel/qtimerinfo_unix.cpp @@ -228,10 +228,11 @@ bool QTimerInfoList::timerWait(timeval &tm) return true; } -void QTimerInfoList::registerTimer(int timerId, int interval, QObject *object) +void QTimerInfoList::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) { QTimerInfo *t = new QTimerInfo; t->id = timerId; + t->timerType = timerType; t->interval.tv_sec = interval / 1000; t->interval.tv_usec = (interval % 1000) * 1000; t->timeout = updateCurrentTime() + t->interval; @@ -292,13 +293,13 @@ bool QTimerInfoList::unregisterTimers(QObject *object) return true; } -QList > QTimerInfoList::registeredTimers(QObject *object) const +QList QTimerInfoList::registeredTimers(QObject *object) const { - QList > list; + QList list; for (int i = 0; i < count(); ++i) { register const QTimerInfo * const t = at(i); if (t->obj == object) - list << QPair(t->id, t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000); + list << QAbstractEventDispatcher::TimerInfo(t->id, t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000, t->timerType); } return list; } diff --git a/src/corelib/kernel/qtimerinfo_unix_p.h b/src/corelib/kernel/qtimerinfo_unix_p.h index d464a14..82acb43 100644 --- a/src/corelib/kernel/qtimerinfo_unix_p.h +++ b/src/corelib/kernel/qtimerinfo_unix_p.h @@ -53,9 +53,7 @@ // We mean it. // -#include -#include -#include +#include "qabstracteventdispatcher.h" #include // struct timeval @@ -64,6 +62,7 @@ QT_BEGIN_NAMESPACE // internal timer info struct QTimerInfo { int id; // - timer identifier + Qt::TimerType timerType; // - timer type timeval interval; // - timer interval timeval timeout; // - when to sent event QObject *obj; // - object to receive event @@ -97,10 +96,10 @@ public: void timerInsert(QTimerInfo *); void timerRepair(const timeval &); - 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 > registeredTimers(QObject *object) const; + QList registeredTimers(QObject *object) const; int activateTimers(); }; diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 7184db8..688cd75 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 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 8cdf40b..d55b28f 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; diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index 6a2d04d..d166b40 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -601,7 +601,7 @@ public: } void registerSocketNotifier(QSocketNotifier *) {} void unregisterSocketNotifier(QSocketNotifier *) {} - void registerTimer(int , int , QObject *) {} + void registerTimer(int , int , Qt::TimerType, QObject *) {} bool unregisterTimer(int ) { return false; } bool unregisterTimers(QObject *) { return false; } QList registeredTimers(QObject *) const { return QList(); } diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index 7fc8710..1f8a3e0 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -1228,7 +1228,7 @@ public: } void registerSocketNotifier(QSocketNotifier *) {} void unregisterSocketNotifier(QSocketNotifier *) {} - void registerTimer(int , int , QObject *) {} + void registerTimer(int, int, Qt::TimerType, QObject *) {} bool unregisterTimer(int ) { return false; } bool unregisterTimers(QObject *) { return false; } QList registeredTimers(QObject *) const { return QList(); } diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp index ccb69dd..df7a690 100644 --- a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp +++ b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp @@ -57,8 +57,7 @@ public: void interrupt() {} bool processEvents(QEventLoop::ProcessEventsFlags) { return false; } void registerSocketNotifier(QSocketNotifier*) {} - int registerTimer(int,QObject*) { return -1; } - void registerTimer(int,int,QObject*) {} + void registerTimer(int,int,Qt::TimerType,QObject*) {} QList registeredTimers(QObject*) const { return QList(); } void unregisterSocketNotifier(QSocketNotifier*) {} bool unregisterTimer(int) { return false; } diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp index cbe5af5..bfb431e 100644 --- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp +++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp @@ -57,8 +57,7 @@ public: void interrupt() {} bool processEvents(QEventLoop::ProcessEventsFlags) { return false; } void registerSocketNotifier(QSocketNotifier*) {} - int registerTimer(int,QObject*) { return -1; } - void registerTimer(int,int,QObject*) {} + void registerTimer(int,int,Qt::TimerType,QObject*) {} QList registeredTimers(QObject*) const { return QList(); } void unregisterSocketNotifier(QSocketNotifier*) {} bool unregisterTimer(int) { return false; } -- 2.7.4