Commit d4a8efbd authored by Bryant's avatar Bryant

QGCMessageView: Added timestamps.

parent a26169d4
...@@ -148,8 +148,9 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr ...@@ -148,8 +148,9 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr
break; break;
} }
// Finally append the properly-styled text. // Finally append the properly-styled text with a timestamp.
msgWidget->appendHtml(QString("<p style=\"%1\">[%2:%3] %4 - %5</p>").arg(style).arg(uasName).arg(compId).arg(severityText).arg(text)); QString dateString = QDateTime::currentDateTime().toString(Qt::SystemLocaleShortDate);
msgWidget->appendHtml(QString("<p style=\"%1\">[%2][%3:%4] %5 - %6</p>").arg(style).arg(dateString).arg(uasName).arg(compId).arg(severityText).arg(text));
qDebug() << msgWidget->document()->toHtml(); qDebug() << msgWidget->document()->toHtml();
// Ensure text area scrolls correctly // Ensure text area scrolls correctly
......
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