mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 00:15:42 +00:00
Revert "Log all Qt messages as usual in debug builds."
This reverts commit 52b9a1fceb
.
This commit is contained in:
@@ -466,22 +466,13 @@ void Launcher::initQtMessageLogging() {
|
||||
QtMsgType type,
|
||||
const QMessageLogContext &context,
|
||||
const QString &msg) {
|
||||
const auto InvokeOriginal = [&] {
|
||||
#ifndef _DEBUG
|
||||
if (Logs::DebugEnabled()) {
|
||||
return;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
if (OriginalMessageHandler) {
|
||||
OriginalMessageHandler(type, context, msg);
|
||||
}
|
||||
};
|
||||
InvokeOriginal();
|
||||
if (Logs::DebugEnabled() || !Logs::started()) {
|
||||
if (!Logs::WritingEntry()) {
|
||||
// Sometimes Qt logs something inside our own logging.
|
||||
LOG((msg));
|
||||
}
|
||||
} else if (OriginalMessageHandler) {
|
||||
OriginalMessageHandler(type, context, msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user