diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-10-18 17:23:08 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-11-07 18:40:37 +0200 |
commit | 210f4271e8946c0da0cefff0c07af80081df20f1 (patch) | |
tree | 6110a216d7c809eb964ef04bbbde8e50c1fc46b7 /src/qml/qml/qqmlengine.cpp | |
parent | 1f63d5331f5b0e7195407c2276a61f9e072c325b (diff) |
Use a temporary getter for QObjectPrivate::threadData
In preparation of making it an atomic.
Change-Id: I549fc224e7d4006585c26ac45f82784ffb030613
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 7edb8b3110..b84a9b843c 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -813,9 +813,9 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in // marshalled back onto the QObject's thread and handled by QML from there. This is tested // by the qqmlecmascript::threadSignal() autotest. if (ddata->notifyList && - QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId.loadRelaxed()) { + QThread::currentThreadId() != QObjectPrivate::get(object)->getThreadData()->threadId.loadRelaxed()) { - if (!QObjectPrivate::get(object)->threadData->thread.loadAcquire()) + if (!QObjectPrivate::get(object)->getThreadData()->thread.loadAcquire()) return; QMetaMethod m = QMetaObjectPrivate::signal(object->metaObject(), index); @@ -847,7 +847,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in QQmlThreadNotifierProxyObject *mpo = new QQmlThreadNotifierProxyObject; mpo->target = object; - mpo->moveToThread(QObjectPrivate::get(object)->threadData->thread.loadAcquire()); + mpo->moveToThread(QObjectPrivate::get(object)->getThreadData()->thread.loadAcquire()); QCoreApplication::postEvent(mpo, ev.take()); } else { |