From 3174387e964f2b320a19e6a472ad60da4f154e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 29 Jul 2021 11:49:11 +0200 Subject: [PATCH] Do not print all debug categories in tests --- libnymea-remoteproxy/engine.cpp | 2 +- tests/testbase/basetest.cpp | 2 ++ tests/testbase/basetest.h | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libnymea-remoteproxy/engine.cpp b/libnymea-remoteproxy/engine.cpp index 5cd1a8c..9db9396 100644 --- a/libnymea-remoteproxy/engine.cpp +++ b/libnymea-remoteproxy/engine.cpp @@ -66,7 +66,7 @@ void Engine::start(ProxyConfiguration *configuration) clean(); m_configuration = configuration; - qCDebug(dcApplication()) << "Using configuration" << m_configuration; + qCDebug(dcEngine()) << "Using configuration" << m_configuration; // Make sure an authenticator was registered Q_ASSERT_X(m_authenticator != nullptr, "Engine", "There is no authenticator registerd."); diff --git a/tests/testbase/basetest.cpp b/tests/testbase/basetest.cpp index 5434282..22d8341 100644 --- a/tests/testbase/basetest.cpp +++ b/tests/testbase/basetest.cpp @@ -87,6 +87,8 @@ void BaseTest::restartEngine() void BaseTest::startEngine() { + QLoggingCategory::setFilterRules("*.debug=false\ndefault.debug=true\nApplication.debug=true"); + m_configuration = new ProxyConfiguration(this); loadConfiguration(":/test-configuration.conf"); diff --git a/tests/testbase/basetest.h b/tests/testbase/basetest.h index b6d8d41..a68f174 100644 --- a/tests/testbase/basetest.h +++ b/tests/testbase/basetest.h @@ -118,8 +118,7 @@ public slots: connection->ignoreSslErrors(); } - inline void verifyError(const QVariant &response, const QString &fieldName, const QString &error) - { + inline void verifyError(const QVariant &response, const QString &fieldName, const QString &error) { QJsonDocument jsonDoc = QJsonDocument::fromVariant(response); QVERIFY2(response.toMap().value("status").toString() == QString("success"), QString("\nExpected status: \"success\"\nGot: %2\nFull message: %3")