| 31 | using namespace GammaRay; |
| 32 | |
| 33 | class QuickInspectorPickingTest : public QObject |
| 34 | { |
| 35 | Q_OBJECT |
| 36 | private: |
| 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 | { |
no test coverage detected