MCPcopy Create free account
hub / github.com/KDAB/GammaRay / waitForSignal

Function waitForSignal

tests/quickinspectorpickingtest.cpp:33–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31using namespace GammaRay;
32
33class QuickInspectorPickingTest : public QObject
34{
35 Q_OBJECT
36private:
37 static void createProbe()
38 {
39 Paths::setRelativeRootPath(GAMMARAY_INVERSE_BIN_DIR);
40 qputenv("GAMMARAY_ProbePath", Paths::probePath(GAMMARAY_PROBE_ABI).toUtf8());
41 qputenv("GAMMARAY_ServerAddress", GAMMARAY_DEFAULT_LOCAL_TCP_URL);
42 Hooks::installHooks();
43 Probe::startupHookReceived();
44 // NOLINTNEXTLINE (clang-analyzer-cplusplus.NewDeleteLeaks)
45 new ProbeCreator(ProbeCreator::Create);
46 // NOLINTNEXTLINE (clang-analyzer-cplusplus.NewDeleteLeaks)
47 QTest::qWait(1); // event loop re-entry
48 }
49
50 static bool waitForSignal(QSignalSpy *spy, bool keepResult = false)
51 {
52 if (spy->isEmpty())
53 spy->wait(1000);
54 bool result = !spy->isEmpty();
55 if (!keepResult)
56 spy->clear();
57 return result;
58 }
59
60 bool showSource(const QString &sourceFile)
61 {

Callers 3

showSourceFunction · 0.85
testCustomRenderModesMethod · 0.85

Calls 2

isEmptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected