diff options
author | Saturneric <[email protected]> | 2023-02-11 13:48:17 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-11 13:48:17 +0000 |
commit | b729e71d48eb21bf3cf6a7efc1e0adbc724bd147 (patch) | |
tree | e49fda39ecc54d15c1aa5947e7303f09616f3598 /src/ui/dialog/keypair_details/KeyPairUIDTab.cpp | |
parent | feat: add more gnupg operations (diff) | |
download | GpgFrontend-b729e71d48eb21bf3cf6a7efc1e0adbc724bd147.tar.gz GpgFrontend-b729e71d48eb21bf3cf6a7efc1e0adbc724bd147.zip |
feat: upgrade qt framework to 6.3
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairUIDTab.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeyPairUIDTab.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp b/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp index a73d091b..1cb49bb5 100644 --- a/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp +++ b/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp @@ -277,17 +277,30 @@ void KeyPairUIDTab::slot_refresh_sig_list() { new QTableWidgetItem(QString::fromStdString(sig.GetEmail())); sig_list_->setItem(sigRow, 2, tmp3); } - +#ifdef GPGFRONTEND_GUI_QT6 + auto* tmp4 = new QTableWidgetItem(QLocale::system().toString( + QDateTime::fromSecsSinceEpoch(to_time_t(sig.GetCreateTime())))); +#else auto* tmp4 = new QTableWidgetItem(QLocale::system().toString( QDateTime::fromTime_t(to_time_t(sig.GetCreateTime())))); +#endif sig_list_->setItem(sigRow, 3, tmp4); +#ifdef GPGFRONTEND_GUI_QT6 + auto* tmp5 = new QTableWidgetItem( + boost::posix_time::to_time_t( + boost::posix_time::ptime(sig.GetExpireTime())) == 0 + ? _("Never Expires") + : QLocale::system().toString(QDateTime::fromSecsSinceEpoch( + to_time_t(sig.GetExpireTime())))); +#else auto* tmp5 = new QTableWidgetItem( boost::posix_time::to_time_t( boost::posix_time::ptime(sig.GetExpireTime())) == 0 ? _("Never Expires") : QLocale::system().toString( QDateTime::fromTime_t(to_time_t(sig.GetExpireTime())))); +#endif tmp5->setTextAlignment(Qt::AlignCenter); sig_list_->setItem(sigRow, 4, tmp5); |