diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-02-14 15:17:16 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-03-06 21:27:05 +0000 |
commit | fb0490dd653e4856a3595bd7e49c3127215170d1 (patch) | |
tree | f29b7d98f74f9cb461cf76f8d23b37dd20c9524e /src/qml/qml/qqmlengine.cpp | |
parent | 13335bdee5482ae04d5b0d4c933ca328a1100cb6 (diff) |
QThreadData::threadId is now QAtomicPointer, so relax loads from Acquire
operator T() does loadAcquire, to match std::atomic behavior. We don't
need that, so let's use a relaxed load.
Side note: why does QtQml need to access the thread ID this way?
Couldn't it do object->thread()? This code comes from a pre-5.0 commit
5570040771ec610583473e2d9e8e069474364cf1 ("Permit signals to be emitted
in a different thread").
Change-Id: I4139d5f93dcb4b429ae9fffd14a34a84d3255a6f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index c800641f1c..f1c592b632 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -774,7 +774,7 @@ 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) { + QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId.load()) { if (!QObjectPrivate::get(object)->threadData->thread) return; |