Remove one more QAtomicInt copy operation

This time, `auto` accidentally copied an atomic instead of making a
local non-atomic copy.

Change-Id: I3c6569f6ea1762e7102e1425346aba6d82bf2b00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Giuseppe D'Angelo 2023-10-22 18:31:49 +02:00
parent bb23a05905
commit 4b0d41448f

View File

@ -1729,7 +1729,7 @@ bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEven
Q_ASSERT(receiver);
Q_ASSERT(postedEvents);
auto receiverPostedEvents = receiver->d_func()->postedEvents;
int receiverPostedEvents = receiver->d_func()->postedEvents.loadRelaxed();
// compress posted timers to this object.
if (event->type() == QEvent::Timer && receiverPostedEvents > 0) {
int timerId = static_cast<QTimerEvent *>(event)->timerId();