4#ifndef QTESTSUPPORT_CORE_H
5#define QTESTSUPPORT_CORE_H
7#include <QtCore/qcoreapplication.h>
8#include <QtCore/qdeadlinetimer.h>
16Q_CORE_EXPORT
void qSleep(
int ms);
17Q_CORE_EXPORT
void qSleep(std::chrono::milliseconds msecs);
19template <
typename Functor>
44 using namespace std::chrono;
47 qSleep((std::min)(10ms, ceil<milliseconds>(remaining)));
54template <
typename Functor>
60Q_CORE_EXPORT
void qWait(
int ms);
62Q_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.
std::chrono::nanoseconds remainingTimeAsDuration() const noexcept
Returns the time remaining before the deadline.
Combined button and popup list for selecting options.
bool qWaitFor(Functor predicate, QDeadlineTimer deadline=QDeadlineTimer(std::chrono::seconds{5}))
Q_CORE_EXPORT void qSleep(int ms)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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)