diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-02 19:24:25 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-02 19:24:25 (GMT) |
commit | 2ef657cd68aaa790e940f8603085e0647583f5f6 (patch) | |
tree | 21856f06cf97de46e7873b98ee6cc060e8bd73ba /src/corelib | |
parent | 6b674ae7459cf8a391a10c3b61fee525add35f98 (diff) | |
parent | 7f68ac15cb2a0b0caa5c56186ed672bebdb3a5b0 (diff) | |
download | Qt-2ef657cd68aaa790e940f8603085e0647583f5f6.zip Qt-2ef657cd68aaa790e940f8603085e0647583f5f6.tar.gz Qt-2ef657cd68aaa790e940f8603085e0647583f5f6.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
update russian translations and phrasebook
Allow platform specific values for the double click radius.
Fix strict-aliasing breakage with SunCC: the union trick is a GCC extension.
QNAM HTTP: Fix invoking a method when being destructed right now
QAbstractSocket: Use new faster DNS function
Add DNS caching to QHostInfo
Make the icon visible when set on an action in a QSystemTrayIcon on Mac
Carbon : Setting palette brush to a pixmap does not work.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/thread/qmutex.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 80b50fc..677412e 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -95,7 +95,7 @@ class Q_CORE_EXPORT QMutexLocker { public: inline explicit QMutexLocker(QMutex *m) - : mtx(m) + : val(reinterpret_cast<quintptr>(m)) { Q_ASSERT_X((val & quintptr(1u)) == quintptr(0), "QMutexLocker", "QMutex pointer is misaligned"); @@ -105,19 +105,19 @@ public: inline void unlock() { - if (mtx) { + if (val) { if ((val & quintptr(1u)) == quintptr(1u)) { val &= ~quintptr(1u); - mtx->unlock(); + mutex()->unlock(); } } } inline void relock() { - if (mtx) { + if (val) { if ((val & quintptr(1u)) == quintptr(0u)) { - mtx->lock(); + mutex()->lock(); val |= quintptr(1u); } } @@ -140,10 +140,7 @@ public: private: Q_DISABLE_COPY(QMutexLocker) - union { - QMutex *mtx; - quintptr val; - }; + quintptr val; }; #else // QT_NO_THREAD |