summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.h
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-02-20 13:59:48 +0200
committerAhmad Samir <a.samirh78@gmail.com>2023-06-13 16:53:09 +0300
commit72d660843b126aee356a637ba5b6c86c88f46f6b (patch)
treee8e989f2004c6caf08cb8f7d70427f3f62f28d4e /src/corelib/kernel/qcoreapplication.h
parent16a19a4f4ab207eba4ba6da987b31628b51903b0 (diff)
QCoreApplication: port processEvents() to QDeadlineTimer
As Eddy pointed out in review, the existing overload API docs says using this method is discouraged; but adding a QDeadlineTimer overload is more about preventing overflow, as it can handle qint64 or chrono::milliseconds. So it's either add this new overload or change the existing one to take a qint64. [ChangeLog][QtCore][QCoreApplication] Added processEvents() overload that takes a QDeadlineTimer. Task-number: QTBUG-110059 Change-Id: I02f938ee8243c09e493bd88ed496b862d87910f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.h')
-rw-r--r--src/corelib/kernel/qcoreapplication.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 37ed9890ed..aa9fe58e2e 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -8,6 +8,7 @@
#include <QtCore/qstring.h>
#ifndef QT_NO_QOBJECT
#include <QtCore/qcoreevent.h>
+#include <QtCore/qdeadlinetimer.h>
#include <QtCore/qeventloop.h>
#include <QtCore/qobject.h>
#else
@@ -93,6 +94,7 @@ public:
static int exec();
static void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents);
static void processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime);
+ static void processEvents(QEventLoop::ProcessEventsFlags flags, QDeadlineTimer deadline);
static bool sendEvent(QObject *receiver, QEvent *event);
static void postEvent(QObject *receiver, QEvent *event, int priority = Qt::NormalEventPriority);