Skip to content

Commit 3a1eec0

Browse files
committed
core/log: fix sparse logs being on by default
1 parent 465d540 commit 3a1eec0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/core/logging.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void LogManager::filterCategory(QLoggingCategory* category) {
192192
filter.applyRule(categoryName, rule);
193193
}
194194

195-
if (isQs && instance->sparse) {
195+
if (isQs && !instance->sparse) {
196196
// We assume the category name pointer will always be the same and be comparable in the message handler.
197197
LogManager::instance()->sparseFilters.insert(
198198
static_cast<const void*>(category->categoryName()),
@@ -241,7 +241,13 @@ void LogManager::init(
241241
auto* thread = new QThread();
242242
instance->threadProxy.moveToThread(thread);
243243
thread->start();
244-
QMetaObject::invokeMethod(&instance->threadProxy, "initInThread", Qt::BlockingQueuedConnection);
244+
245+
QMetaObject::invokeMethod(
246+
&instance->threadProxy,
247+
&LoggingThreadProxy::initInThread,
248+
Qt::BlockingQueuedConnection
249+
);
250+
245251
qCDebug(logLogging) << "Logger initialized.";
246252
}
247253

0 commit comments

Comments
 (0)