4#ifndef QTESTSUPPORT_CORE_H
5#define QTESTSUPPORT_CORE_H
7#include <QtCore/qcoreapplication.h>
8#include <QtCore/qdeadlinetimer.h>
9#include <QtCore/qthread.h>
15Q_CORE_EXPORT
void qSleep(
int ms);
16Q_CORE_EXPORT
void qSleep(std::chrono::milliseconds msecs);
18template <
typename Functor>
19[[nodiscard]]
static bool
31 using namespace std::chrono;
56 qSleep(std::min(10ms, remaining));
62template <
typename Functor>
68Q_CORE_EXPORT
void qWait(
int ms);
70Q_CORE_EXPORT
void qWait(std::chrono::milliseconds msecs);
static void processEvents(QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
Processes some pending events for the calling thread according to the specified flags.
static void sendPostedEvents(QObject *receiver=nullptr, int event_type=0)
Immediately dispatches all events which have been previously queued with QCoreApplication::postEvent(...
bool hasExpired() const noexcept
Returns true if this QDeadlineTimer object has expired, false if there remains time left.
constexpr bool isForever() const noexcept
Returns true if this QDeadlineTimer object never expires, false otherwise.
std::chrono::nanoseconds remainingTimeAsDuration() const noexcept
Returns the time remaining before the deadline.
Combined button and popup list for selecting options.
Q_CORE_EXPORT void qSleep(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static bool qWaitFor(Functor predicate, QDeadlineTimer deadline=QDeadlineTimer(std::chrono::seconds{5}))
Q_CORE_EXPORT void qWait(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
GLbitfield GLuint64 timeout
[4]
QDeadlineTimer deadline(30s)