diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-26 07:56:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-06-28 00:24:10 +0200 |
commit | 5220b40edd52ea70ed3a09f9a28fa7fe50ce71e6 (patch) | |
tree | 4bdd731901e9352ea302fafd2f6413cb84ec9750 /src/corelib/kernel/qobject.cpp | |
parent | e36e32c21312eee42194815da82203648023a67b (diff) |
Port from implicit to explicit atomic integer operations
The old code used the implicit conversions from QAtomicInteger<T> to T
and vice versa. The semantics of these differ from the ones std::atomic
uses, so we're going to deprecate these, like we did for load() and
store(), too.
This patch fixex some users of these APIs before we deprecate them.
Change-Id: I4877276581757cd57e042efea8296fe535a493d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8f80be30bd..e3b25f8bf7 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -421,7 +421,7 @@ void QObjectPrivate::ConnectionData::cleanOrphanedConnectionsImpl(QObject *sende ConnectionOrSignalVector *c = nullptr; { QBasicMutexLocker l(signalSlotLock(sender)); - if (ref > 1) + if (ref.loadAcquire() > 1) return; // Since ref == 1, no activate() is in process since we locked the mutex. That implies, |