Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/offline_health_registry_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);

// Declared at main scope because the `hl2` factory section 5 installs
// captures it by reference and stays installed until the process exits:
// every later rebuild of `hl2` writes through it.
RecorderState rec;

// ---- 1. the declaration exists at all ----
check(OfflineHealthRegistry::declaredFor(QStringLiteral("hl2")),
"hl2 declared an offline health source (registrar was linked in)");
Expand Down Expand Up @@ -194,7 +199,6 @@ int main(int argc, char** argv)
// resolves. OfflineHealthRegistry::declare() warns on a re-declaration --
// that warning is this line, and it is expected output.
{
RecorderState rec;
OfflineHealthRegistry::declare(
QStringLiteral("hl2"), [&rec](QObject*) {
return std::unique_ptr<IOfflineHealthSource>(
Expand Down
Loading