MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / waitForSignal

Function waitForSignal

pj_runtime/tests/update_checker_test.cpp:28–34  ·  view source on GitHub ↗

Spins the event loop until `spy` receives a signal or the timeout expires.

Source from the content-addressed store, hash-verified

26
27// Spins the event loop until `spy` receives a signal or the timeout expires.
28bool waitForSignal(QSignalSpy& spy, int timeout_ms = 5000) {
29 QDeadlineTimer deadline(timeout_ms);
30 while (spy.isEmpty() && !deadline.hasExpired()) {
31 QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
32 }
33 return !spy.isEmpty();
34}
35
36// Minimal loopback HTTP/1.1 server that replies to every request with a
37// configurable status line + body. No external network required.

Callers 1

TESTFunction · 0.70

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected