Commit ebc49063 authored by Ghislain MARY's avatar Ghislain MARY

Improve display of log messages.

parent 3b23d1af
......@@ -66,8 +66,12 @@ void Logger::appendMessage(quint64 time, Connection::LogLevel level, const QStri
} else if (level == Connection::Error) {
format.setForeground(Qt::red);
}
table->cellAt(0, 0).firstCursorPosition().insertText('[' + QString("%1.%2").arg(time / 1000).arg(time % 1000) + "] ");
table->cellAt(0, 1).firstCursorPosition().insertText(message, format);
QString seconds = QString("%1").arg(time / 1000);
seconds = seconds.rightJustified(10, ' ');
QString milliseconds = QString("%1").arg(time % 1000);
milliseconds = milliseconds.rightJustified(3, '0');
table->cellAt(0, 0).firstCursorPosition().insertText('[' + seconds + "." + milliseconds + "] ");
table->cellAt(0, 1).firstCursorPosition().insertText(message.trimmed(), format);
if (barpos == barmax) {
bar->setValue(bar->maximum());
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment