diff options
author | Janne Koskinen <janne.p.koskinen@digia.com> | 2009-06-17 13:51:46 (GMT) |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@digia.com> | 2009-06-17 13:51:46 (GMT) |
commit | d9911390f17426801f553cb82654e102fe0400b9 (patch) | |
tree | 5c0dd218d44d0989761c01007d128de2d0e60f4c /src/corelib | |
parent | 75140c4776934744c37a34b10b7d4b8665aa4dc1 (diff) | |
parent | 06346d241d3a66bb488addcacae8a6e0d0d6e59c (diff) | |
download | Qt-d9911390f17426801f553cb82654e102fe0400b9.zip Qt-d9911390f17426801f553cb82654e102fe0400b9.tar.gz Qt-d9911390f17426801f553cb82654e102fe0400b9.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 11 | ||||
-rw-r--r-- | src/corelib/tools/qscopedpointer.cpp | 17 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 423fbaa..17bb9a7 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -231,6 +231,9 @@ void QTimerActiveObject::RunL() void QTimerActiveObject::Run() { + if (!okToRun()) + return; + if (m_timerInfo->interval > 0) { // Start a new timer immediately so that we don't lose time. iStatus = KRequestPending; @@ -644,9 +647,9 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla QT_TRY { Q_D(QAbstractEventDispatcher); - // It is safe if this counter overflows. The main importance is that each - // iteration count is different from the last. - m_iterationCount++; + // It is safe if this counter overflows. The main importance is that each + // iteration count is different from the last. + m_iterationCount++; RThread &thread = d->threadData->symbian_thread_handle; @@ -719,7 +722,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla break; } block = false; - if (timeState == TimeStarted && time.elapsed() > 100) { + if (timeState == TimeStarted && time.elapsed() > 100) { priority = m_processHandle.Priority(); m_processHandle.SetPriority(EPriorityLow); time.start(); diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 6a1ffb6..912edb6 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -80,6 +80,21 @@ \note QScopedPointer does not work with arrays. + \section1 Forward Declared Pointers + + Classes that are forward declared can be used within QScopedPointer, as + long as the destructor of the forward declared class is available whenever + a QScopedPointer needs to clean up. + + Concretely, this means that all classes containing a QScopedPointer that + points to a forward declared class must have non-inline constructors, + destructors and assignment operators: + + \snippet doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp 4 + + Otherwise, the compiler output a warning about not being able to destruct + \c MyPrivateClass. + \sa QSharedPointer */ @@ -142,7 +157,7 @@ /*! - \fn bool QScopedPointer::operator!=(const QScopedPointer<T> *other) const + \fn bool QScopedPointer::operator!=(const QScopedPointer<T> &other) const Inequality operator. Returns true if the scoped pointer \a other is not pointing to the same object as this pointer, otherwise returns false. |