From c4865c3596c478b02e1f99963a2b4f99e13e2c9b Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Wed, 2 Aug 2023 19:39:15 +0300 Subject: [PATCH] QEventDispatcherUNIX: clarify some code with a comment Change-Id: I8bb6c39f4764b530a407ad6d68bf09bb8742ac4c Reviewed-by: Thiago Macieira --- src/corelib/kernel/qeventdispatcher_unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 007b396db4..dc97893435 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -426,6 +426,9 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags) if (d->interrupt.loadRelaxed()) return false; + // If canWait is true, and include_timers is false or there are no pending + // timers, call qt_safe_poll() with a nullptr so that it waits until there + // are events to process (see QEventLoop::WaitForMoreEvents). timespec *tm = nullptr; timespec wait_tm = { 0, 0 };