QEventDispatcherCF: avoid QFlags->int implicit casts

Use toInt(), or an explicit cast. (I don't quite know why an atomic int
is involved here, but anyways, it makes these casts necessary.)

Change-Id: I8816ef96bd69a6f3e3f8e025e567e3451069462c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Giuseppe D'Angelo 2021-05-14 16:45:58 +02:00
parent 86bf3a4ddb
commit 3b0c6bf486
2 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag
// to do another pass.
// But we should only wait for more events the first time
m_processEvents.flags &= ~QEventLoop::WaitForMoreEvents;
m_processEvents.flags &= ~int(QEventLoop::WaitForMoreEvents);
continue;
} else if (m_overdueTimerScheduled && !m_processEvents.processedTimers) {

View File

@ -236,7 +236,7 @@ protected:
struct ProcessEventsState
{
ProcessEventsState(QEventLoop::ProcessEventsFlags f)
: flags(f), wasInterrupted(false)
: flags(f.toInt()), wasInterrupted(false)
, processedPostedEvents(false), processedTimers(false)
, deferredWakeUp(false), deferredUpdateTimers(false) {}