From 3352f47eee1b7c29fe3946976522c763a9dabc67 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Mon, 2 Oct 2017 14:35:49 -0600 Subject: [PATCH] don't log information we don't have --- openbr/openbr_plugin.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 2dc2d40..11e96cb 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -1426,7 +1426,15 @@ void br::Context::messageHandler(QtMsgType type, const QMessageLogContext &conte case QtCriticalMsg: txt = QString("Critical: %1\n").arg(msg); break; default: txt = QString("Fatal: %1\n" ).arg(msg); break; } - txt += " SDK Path: " + Globals->sdkPath + "\n File: " + QString(context.file) + "\n Function: " + QString(context.function) + "\n Line: " + QString::number(context.line) + "\n"; + + if (Globals->sdkPath != ":") + txt += " SDK Path: " + Globals->sdkPath + "\n"; + if (!QString(context.file).isEmpty()) + txt += " File: " + QString(context.file) + "\n"; + if (!QString(context.function).isEmpty()) + txt += " Function: " + QString(context.function) + "\n"; + if (context.line != 0) + txt += " Line: " + QString::number(context.line) + "\n"; } std::cerr << txt.toStdString(); -- libgit2 0.21.4