diff options
author | axis <qt-info@nokia.com> | 2009-08-21 08:43:24 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-08-21 08:46:31 (GMT) |
commit | e909151283a561643a25a72ff85588a00d9f1e7d (patch) | |
tree | ef8f2ca4bc9ff871a06fadf073c8af6f907b4303 /src/corelib | |
parent | 0179bc8e688714b33e4f14780578f630e8ddcd7b (diff) | |
download | Qt-e909151283a561643a25a72ff85588a00d9f1e7d.zip Qt-e909151283a561643a25a72ff85588a00d9f1e7d.tar.gz Qt-e909151283a561643a25a72ff85588a00d9f1e7d.tar.bz2 |
Switched to logical comparison instead of bitwise.
This was done because I initially thought that KRequestPending was a
bit flag, but it turns out it's just an int value, so == is more
correct.
RevBy: Iain
AutoTest: Passed
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 10 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian_p.h | 7 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 7bca408..881e546 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -184,7 +184,7 @@ QWakeUpActiveObject::~QWakeUpActiveObject() void QWakeUpActiveObject::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -214,7 +214,7 @@ void QTimerActiveObject::DoCancel() m_rTimer.Cancel(); m_rTimer.Close(); } else { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -301,7 +301,7 @@ QCompleteDeferredAOs::~QCompleteDeferredAOs() void QCompleteDeferredAOs::complete() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -309,7 +309,7 @@ void QCompleteDeferredAOs::complete() void QCompleteDeferredAOs::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -578,7 +578,7 @@ QSocketActiveObject::~QSocketActiveObject() void QSocketActiveObject::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h index 69912d0..021de13 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian_p.h +++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h @@ -281,13 +281,9 @@ private: }; #ifdef QT_DEBUG -// EActive is defined to 1 and ERequestPending to 2, but they are both private. -// A little dangerous to rely on, but it is only for debugging. -# define REQUEST_STATUS_ACTIVE_AND_PENDING 3 # define VERIFY_PENDING_REQUEST_STATUS \ - Q_ASSERT(status->Int() & REQUEST_STATUS_ACTIVE_AND_PENDING == REQUEST_STATUS_ACTIVE_AND_PENDING); + Q_ASSERT(status->Int() == KRequestPending); #else -# define REQUEST_STATUS_ACTIVE_AND_PENDING # define VERIFY_PENDING_REQUEST_STATUS #endif @@ -304,7 +300,6 @@ inline void QEventDispatcherSymbian::RequestComplete(RThread &threadHandle, TReq threadHandle.RequestComplete(status, reason); } -#undef REQUEST_STATUS_ACTIVE_AND_PENDING #undef VERIFY_PENDING_REQUEST_STATUS QT_END_NAMESPACE |