Event dispatchers: code tidies
Turn an implicit conversion to bool in * a call to testAnyFlag in one case; * a comparison against 0 in another case, for consistency with the surrounding code. Change-Id: I1eee42ba82c59a72430bf507ea80408c553be889 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5a1c3c29ac
commit
c568257a52
@ -411,7 +411,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||
{
|
||||
Q_D(QEventDispatcherGlib);
|
||||
|
||||
const bool canWait = (flags & QEventLoop::WaitForMoreEvents);
|
||||
const bool canWait = flags.testAnyFlag(QEventLoop::WaitForMoreEvents);
|
||||
if (canWait)
|
||||
emit aboutToBlock();
|
||||
else
|
||||
|
@ -469,7 +469,7 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||
|
||||
const bool include_timers = (flags & QEventLoop::X11ExcludeTimers) == 0;
|
||||
const bool include_notifiers = (flags & QEventLoop::ExcludeSocketNotifiers) == 0;
|
||||
const bool wait_for_events = flags & QEventLoop::WaitForMoreEvents;
|
||||
const bool wait_for_events = (flags & QEventLoop::WaitForMoreEvents) != 0;
|
||||
|
||||
const bool canWait = (threadData->canWaitLocked()
|
||||
&& !d->interrupt.loadRelaxed()
|
||||
|
Loading…
x
Reference in New Issue
Block a user