From 0875831f6d21e524e9b2094ee1941a146328e9e9 Mon Sep 17 00:00:00 2001 From: zedamota Date: Sun, 20 Nov 2011 18:18:51 +0000 Subject: [PATCH] made the firmware date display on a more user friendly format --- ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp | 4 ++-- .../openpilotgcs/src/plugins/uploader/runningdevicewidget.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp index 6ef7850e0..9e57a4225 100644 --- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp @@ -183,7 +183,7 @@ bool deviceWidget::populateBoardStructuredDescription(QByteArray desc) if(UAVObjectUtilManager::descriptionToStructure(desc,&onBoardDescrition)) { myDevice->lblGitTag->setText(onBoardDescrition.gitTag); - myDevice->lblBuildDate->setText(onBoardDescrition.buildDate); + myDevice->lblBuildDate->setText(onBoardDescrition.buildDate.insert(4,"-").insert(7,"-")); if(onBoardDescrition.description.startsWith("release",Qt::CaseInsensitive)) { myDevice->lblDescription->setText(QString("Firmware tag: ")+onBoardDescrition.description); @@ -213,7 +213,7 @@ bool deviceWidget::populateLoadedStructuredDescription(QByteArray desc) if(UAVObjectUtilManager::descriptionToStructure(desc,&LoadedDescrition)) { myDevice->lblGitTagL->setText(LoadedDescrition.gitTag); - myDevice->lblBuildDateL->setText( LoadedDescrition.buildDate); + myDevice->lblBuildDateL->setText( LoadedDescrition.buildDate.insert(4,"-").insert(7,"-")); if(LoadedDescrition.description.startsWith("release",Qt::CaseInsensitive)) { myDevice->lblDescritpionL->setText(LoadedDescrition.description); diff --git a/ground/openpilotgcs/src/plugins/uploader/runningdevicewidget.cpp b/ground/openpilotgcs/src/plugins/uploader/runningdevicewidget.cpp index 2cb513344..fcde00125 100644 --- a/ground/openpilotgcs/src/plugins/uploader/runningdevicewidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/runningdevicewidget.cpp @@ -128,7 +128,7 @@ void runningDeviceWidget::populate() myDevice->lblCertified->setToolTip(tr("Untagged or custom firmware build")); } myDevice->lblGitCommitTag->setText("Git commit tag: "+devDesc.gitTag); - myDevice->lblFWDate->setText(QString("Firmware date: ") + devDesc.buildDate); + myDevice->lblFWDate->setText(QString("Firmware date: ") + devDesc.buildDate.insert(4,"-").insert(7,"-")); } else {