core/log: fix sparse logs being on by default

This commit is contained in:
outfoxxed 2024-09-05 21:44:05 -07:00
parent 465d5402f2
commit 3a1eec0ed5
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -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<const void*>(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.";
}