Commit 3352f47eee1b7c29fe3946976522c763a9dabc67

Authored by Josh Klontz
1 parent 7bde9abc

don't log information we don't have

Showing 1 changed file with 9 additions and 1 deletions
openbr/openbr_plugin.cpp
... ... @@ -1426,7 +1426,15 @@ void br::Context::messageHandler(QtMsgType type, const QMessageLogContext &conte
1426 1426 case QtCriticalMsg: txt = QString("Critical: %1\n").arg(msg); break;
1427 1427 default: txt = QString("Fatal: %1\n" ).arg(msg); break;
1428 1428 }
1429   - txt += " SDK Path: " + Globals->sdkPath + "\n File: " + QString(context.file) + "\n Function: " + QString(context.function) + "\n Line: " + QString::number(context.line) + "\n";
  1429 +
  1430 + if (Globals->sdkPath != ":")
  1431 + txt += " SDK Path: " + Globals->sdkPath + "\n";
  1432 + if (!QString(context.file).isEmpty())
  1433 + txt += " File: " + QString(context.file) + "\n";
  1434 + if (!QString(context.function).isEmpty())
  1435 + txt += " Function: " + QString(context.function) + "\n";
  1436 + if (context.line != 0)
  1437 + txt += " Line: " + QString::number(context.line) + "\n";
1430 1438 }
1431 1439  
1432 1440 std::cerr << txt.toStdString();
... ...