aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyPairUIDTab.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-12-06 20:38:05 +0000
committerSaturneric <[email protected]>2021-12-06 20:38:05 +0000
commit4f9ee73ffdda5a495d25ebf4f769a4c43aa78295 (patch)
tree7ef532525a250c485d95c1df5e4b432e169ec53c /src/ui/keypair_details/KeyPairUIDTab.cpp
parentImprove UI & Functions (diff)
downloadGpgFrontend-4f9ee73ffdda5a495d25ebf4f769a4c43aa78295.tar.gz
GpgFrontend-4f9ee73ffdda5a495d25ebf4f769a4c43aa78295.zip
Test & Improve UI
Diffstat (limited to 'src/ui/keypair_details/KeyPairUIDTab.cpp')
-rw-r--r--src/ui/keypair_details/KeyPairUIDTab.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ui/keypair_details/KeyPairUIDTab.cpp b/src/ui/keypair_details/KeyPairUIDTab.cpp
index 11055df3..8a58b270 100644
--- a/src/ui/keypair_details/KeyPairUIDTab.cpp
+++ b/src/ui/keypair_details/KeyPairUIDTab.cpp
@@ -24,6 +24,8 @@
#include "ui/keypair_details/KeyPairUIDTab.h"
+#include <boost/locale.hpp>
+
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyManager.h"
#include "gpg/function/UidOperator.h"
@@ -271,16 +273,19 @@ void KeyPairUIDTab::slotRefreshSigList() {
sigList->setItem(sigRow, 2, tmp3);
}
- auto* tmp4 = new QTableWidgetItem(QString::fromStdString(
- boost::gregorian::to_iso_string(sig.create_time())));
+ std::stringstream ss;
+ ss << boost::locale::as::datetime << sig.create_time();
+ auto* tmp4 = new QTableWidgetItem(ss.str().c_str());
sigList->setItem(sigRow, 3, tmp4);
+ ss.str(std::string());
+ ss << boost::locale::as::datetime << sig.expire_time();
+
auto* tmp5 = new QTableWidgetItem(
boost::posix_time::to_time_t(
boost::posix_time::ptime(sig.expire_time())) == 0
? _("Never Expires")
- : QString::fromStdString(
- boost::gregorian::to_iso_string(sig.expire_time())));
+ : ss.str().c_str());
tmp5->setTextAlignment(Qt::AlignCenter);
sigList->setItem(sigRow, 4, tmp5);