diff options
Diffstat (limited to 'tests/auto/widgets/util.h')
-rw-r--r-- | tests/auto/widgets/util.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/auto/widgets/util.h b/tests/auto/widgets/util.h index 770579f1f..356cf6ebb 100644 --- a/tests/auto/widgets/util.h +++ b/tests/auto/widgets/util.h @@ -42,29 +42,6 @@ #endif /** - * Starts an event loop that runs until the given signal is received. - * Optionally the event loop - * can return earlier on a timeout. - * - * \return \p true if the requested signal was received - * \p false on timeout - */ -static inline bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) -{ - QEventLoop loop; - QObject::connect(obj, signal, &loop, SLOT(quit())); - QTimer timer; - QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); - if (timeout > 0) { - QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); - timer.setSingleShot(true); - timer.start(timeout); - } - loop.exec(); - return timeoutSpy.isEmpty(); -} - -/** * Just like QSignalSpy but facilitates sync and async * signal emission. For example if you want to verify that * page->foo() emitted a signal, it could be that the |