summaryrefslogtreecommitdiff
path: root/src/logbuffer.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-01-06 19:31:53 +0100
committerTannin <devnull@localhost>2015-01-06 19:31:53 +0100
commit9edc39633b82b5e02d33c4b0a395fe110af28eb4 (patch)
tree90d627525292cb87f3d4b7330b1847a17b568b61 /src/logbuffer.cpp
parentb415db619ed027ec2acd283983624293274b090f (diff)
- bugfixes
- moved more functionality to game-plugins - further decoupled management functionality from the UI - created another "tutorial" which is only a single page with relevant parts of the ui highlighted with info as tooltips
Diffstat (limited to 'src/logbuffer.cpp')
-rw-r--r--src/logbuffer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/logbuffer.cpp b/src/logbuffer.cpp
index 635ce13e..fdfce6c5 100644
--- a/src/logbuffer.cpp
+++ b/src/logbuffer.cpp
@@ -132,8 +132,12 @@ void LogBuffer::log(QtMsgType type, const QMessageLogContext &context, const QSt
if (type == QtDebugMsg) {
fprintf(stdout, "%s [%c] %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type), qPrintable(message));
} else {
- fprintf(stdout, "%s [%c] (%s:%u) %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type),
- context.file, context.line, qPrintable(message));
+ if (context.line != 0) {
+ fprintf(stdout, "%s [%c] (%s:%u) %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type),
+ context.file, context.line, qPrintable(message));
+ } else {
+ fprintf(stdout, "%s [%c] %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type), qPrintable(message));
+ }
}
fflush(stdout);
}