diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-17 15:04:23 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-17 15:04:23 (GMT) |
commit | c29533ab2094c38bb63d50dd6306cfe6ccacc868 (patch) | |
tree | e539b2062c870dd431f522d1d1e0677008eaa717 /src/corelib/kernel/qobject.cpp | |
parent | f15b8a83e2e51955776a3f07cb85ebfc342dd8ef (diff) | |
parent | 198efeb27e5c2a87d0a2bb6859446cb1faf45ed8 (diff) | |
download | Qt-c29533ab2094c38bb63d50dd6306cfe6ccacc868.zip Qt-c29533ab2094c38bb63d50dd6306cfe6ccacc868.tar.gz Qt-c29533ab2094c38bb63d50dd6306cfe6ccacc868.tar.bz2 |
Merge branch 'kinetic-animations' into kinetic-statemachine
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 55cf464..05015c0 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1121,13 +1121,13 @@ bool QObject::event(QEvent *e) QThreadData *threadData = d->threadData; QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; if (eventDispatcher) { - // 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). - d->inThreadChangeEvent = true; QList<QPair<int, int> > timers = eventDispatcher->registeredTimers(this); - d->inThreadChangeEvent = false; 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). + d->inThreadChangeEvent = true; eventDispatcher->unregisterTimers(this); + d->inThreadChangeEvent = false; QMetaObject::invokeMethod(this, "_q_reregisterTimers", Qt::QueuedConnection, Q_ARG(void*, (new QList<QPair<int, int> >(timers)))); } |