diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index 1bfadc4442..d79e168cb3 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -74,12 +74,12 @@ public: : QBasicAtomicInteger() #endif { - this->store(other.load()); + this->storeRelease(other.loadAcquire()); } inline QAtomicInteger &operator=(const QAtomicInteger &other) Q_DECL_NOTHROW { - this->store(other.load()); + this->storeRelease(other.loadAcquire()); return *this; } @@ -148,12 +148,12 @@ public: #endif inline QAtomicPointer(const QAtomicPointer &other) Q_DECL_NOTHROW { - this->store(other.load()); + this->storeRelease(other.loadAcquire()); } inline QAtomicPointer &operator=(const QAtomicPointer &other) Q_DECL_NOTHROW { - this->store(other.load()); + this->storeRelease(other.loadAcquire()); return *this; }