From 51c8c0695192677f821759b98f8ba6496df41fa7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 Mar 2025 12:56:53 -0400 Subject: [PATCH] tst_QLoggingRegistry: reinitialize the rules after modifying the env Don't assume that this call to QLoggingRegistry::instance() was the first in the test application's execution. Change-Id: Ia2d32ed7c4d930bef30efffd0b7d38a536b95772 Reviewed-by: Edward Welbourne --- tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp index 94e6bafa408..0fd62d40f62 100644 --- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp +++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp @@ -193,6 +193,7 @@ private slots: QCOMPARE(qtDisabledByDefault.isDebugEnabled(), false); QLoggingRegistry ®istry = *QLoggingRegistry::instance(); + registry.initializeRules(); QCOMPARE(registry.ruleSets[QLoggingRegistry::ApiRules].size(), 0); QCOMPARE(registry.ruleSets[QLoggingRegistry::ConfigRules].size(), 0); QCOMPARE(registry.ruleSets[QLoggingRegistry::EnvironmentRules].size(), 1);