MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / initQtMessageLogging

Method initQtMessageLogging

Telegram/SourceFiles/core/launcher.cpp:506–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506void Launcher::initQtMessageLogging() {
507 static QtMessageHandler OriginalMessageHandler = nullptr;
508 OriginalMessageHandler = qInstallMessageHandler([](
509 QtMsgType type,
510 const QMessageLogContext &context,
511 const QString &msg) {
512 if (OriginalMessageHandler) {
513 OriginalMessageHandler(type, context, msg);
514 }
515 if (Logs::DebugEnabled() || !Logs::started()) {
516 if (!Logs::WritingEntry()) {
517 // Sometimes Qt logs something inside our own logging.
518 LOG((msg));
519 }
520 }
521 });
522}
523
524uint64 Launcher::installationTag() const {
525 return InstallationTag;

Callers

nothing calls this directly

Calls 3

DebugEnabledFunction · 0.85
startedFunction · 0.85
WritingEntryFunction · 0.85

Tested by

no test coverage detected