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-29 09:10:34 +0200 |
commit | 66223727c708e48009cbf297721aa2d0134b48d2 (patch) | |
tree | 1322aaf58bc115b5374f81757124241cb78c463f /src/corelib/kernel/qeventloop.cpp | |
parent | 282c030785498d94c3ccee59a1a201f090e69248 (diff) |
Port from implicit to explicit atomic pointer operations
The old code used the implicit conversions from QAtomicPointer<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: I0a88bb1c359392538bb64b511bfc62381a56a468
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qeventloop.cpp')
-rw-r--r-- | src/corelib/kernel/qeventloop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp index 2104b22095..eacd0c4e73 100644 --- a/src/corelib/kernel/qeventloop.cpp +++ b/src/corelib/kernel/qeventloop.cpp @@ -165,7 +165,7 @@ int QEventLoop::exec(ProcessEventsFlags flags) { Q_D(QEventLoop); //we need to protect from race condition with QThread::exit - QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(d->threadData->thread))->mutex); + QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(d->threadData->thread.loadAcquire()))->mutex); if (d->threadData->quitNow) return -1; |