aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-01 19:38:42 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-02 10:28:58 +0200
commitb85c2deccae3006468eaf3023d5b3bf802739747 (patch)
tree3bcb15a9964015fcbe752ac5a00443359b16894d /src/qml/qml/qqmlengine.cpp
parent0e803fb025813d4cd6a7df14695c75776ae7e27b (diff)
Port from implicit to explicit atomic operations
The old code used the implicit conversions from QAtomicPointer<T> to T*, and 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 fixes some users of these APIs before we deprecate them. Change-Id: I892d705c22280f1c6fdc62c1777248b44e9c4329 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 159479c76f..4d73d72655 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -813,7 +813,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in
if (ddata->notifyList &&
QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId.loadRelaxed()) {
- if (!QObjectPrivate::get(object)->threadData->thread)
+ if (!QObjectPrivate::get(object)->threadData->thread.loadAcquire())
return;
QMetaMethod m = QMetaObjectPrivate::signal(object->metaObject(), index);
@@ -849,7 +849,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in
QQmlThreadNotifierProxyObject *mpo = new QQmlThreadNotifierProxyObject;
mpo->target = object;
- mpo->moveToThread(QObjectPrivate::get(object)->threadData->thread);
+ mpo->moveToThread(QObjectPrivate::get(object)->threadData->thread.loadAcquire());
QCoreApplication::postEvent(mpo, ev);
} else {