diff --git a/src/ui/uas/QGCMessageView.cc b/src/ui/uas/QGCMessageView.cc index 2bf8963d3c899b5d3d8287a28708ef5764258e69..5e234c609ddb8c5d9ab3fec928a0a6edf5ab8ee4 100644 --- a/src/ui/uas/QGCMessageView.cc +++ b/src/ui/uas/QGCMessageView.cc @@ -148,8 +148,9 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr break; } - // Finally append the properly-styled text. - msgWidget->appendHtml(QString("
[%2:%3] %4 - %5
").arg(style).arg(uasName).arg(compId).arg(severityText).arg(text)); + // Finally append the properly-styled text with a timestamp. + QString dateString = QDateTime::currentDateTime().toString(Qt::SystemLocaleShortDate); + msgWidget->appendHtml(QString("[%2][%3:%4] %5 - %6
").arg(style).arg(dateString).arg(uasName).arg(compId).arg(severityText).arg(text)); qDebug() << msgWidget->document()->toHtml(); // Ensure text area scrolls correctly