Fix: do not print an empty buffer ending with \n
This commit is contained in:
parent
809440ba95
commit
e420f95eb0
@ -68,6 +68,7 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
datetime.time().toString(format).toStdString().c_str(),
|
||||
fractional_part,
|
||||
localMsg.constData());
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
} break;
|
||||
case QtInfoMsg: {
|
||||
@ -77,6 +78,7 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
datetime.time().toString(format).toStdString().c_str(),
|
||||
fractional_part,
|
||||
localMsg.constData());
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
} break;
|
||||
case QtWarningMsg: {
|
||||
@ -86,6 +88,7 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
datetime.time().toString(format).toStdString().c_str(),
|
||||
fractional_part,
|
||||
localMsg.constData());
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
} break;
|
||||
case QtCriticalMsg: {
|
||||
@ -96,6 +99,7 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
datetime.time().toString(format).toStdString().c_str(),
|
||||
fractional_part,
|
||||
localMsg.constData());
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
} break;
|
||||
case QtFatalMsg: {
|
||||
@ -107,6 +111,7 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
datetime.time().toString(format).toStdString().c_str(),
|
||||
fractional_part,
|
||||
localMsg.constData());
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
} break;
|
||||
default: {
|
||||
@ -115,7 +120,6 @@ void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
||||
msg.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user