From 3a1eec0ed59ce46ff878fbbbdf260a2268566709 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 5 Sep 2024 21:44:05 -0700 Subject: [PATCH] core/log: fix sparse logs being on by default --- src/core/logging.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/logging.cpp b/src/core/logging.cpp index 72ac81b1..60d2c3c2 100644 --- a/src/core/logging.cpp +++ b/src/core/logging.cpp @@ -192,7 +192,7 @@ void LogManager::filterCategory(QLoggingCategory* category) { filter.applyRule(categoryName, rule); } - if (isQs && instance->sparse) { + if (isQs && !instance->sparse) { // We assume the category name pointer will always be the same and be comparable in the message handler. LogManager::instance()->sparseFilters.insert( static_cast(category->categoryName()), @@ -241,7 +241,13 @@ void LogManager::init( auto* thread = new QThread(); instance->threadProxy.moveToThread(thread); thread->start(); - QMetaObject::invokeMethod(&instance->threadProxy, "initInThread", Qt::BlockingQueuedConnection); + + QMetaObject::invokeMethod( + &instance->threadProxy, + &LoggingThreadProxy::initInThread, + Qt::BlockingQueuedConnection + ); + qCDebug(logLogging) << "Logger initialized."; }