aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairDetailTab.cpp')
-rw-r--r--src/ui/dialog/keypair_details/KeyPairDetailTab.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
index 2770f9af..5863dfe9 100644
--- a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
@@ -242,38 +242,22 @@ void KeyPairDetailTab::slot_refresh_key_info() {
key_size_val = QString::number(key_.GetPrimaryKeyLength());
- if (to_time_t(boost::posix_time::ptime(key_.GetExpireTime())) == 0) {
+ if (key_.GetExpireTime().toSecsSinceEpoch() == 0) {
expire_var_label_->setText(_("Never Expire"));
} else {
-#ifdef GPGFRONTEND_GUI_QT6
- expire_var_label_->setText(QLocale::system().toString(
- QDateTime::fromSecsSinceEpoch(to_time_t(key_.GetExpireTime()))));
-#else
- expire_var_label_->setText(QLocale::system().toString(
- QDateTime::fromTime_t(to_time_t(key_.GetExpireTime()))));
-#endif
+ expire_var_label_->setText(
+ QLocale::system().toString((key_.GetExpireTime())));
}
key_algo_val = key_.GetPublicKeyAlgo();
-#ifdef GPGFRONTEND_GUI_QT6
- created_var_label_->setText(QLocale::system().toString(
- QDateTime::fromSecsSinceEpoch(to_time_t(key_.GetCreateTime()))));
-#else
- created_var_label_->setText(QLocale::system().toString(
- QDateTime::fromTime_t(to_time_t(key_.GetCreateTime()))));
-#endif
+ created_var_label_->setText(QLocale::system().toString(key_.GetCreateTime()));
- if (to_time_t(boost::posix_time::ptime(key_.GetLastUpdateTime())) == 0) {
+ if (key_.GetLastUpdateTime().toSecsSinceEpoch() == 0) {
last_update_var_label_->setText(_("No Data"));
} else {
-#ifdef GPGFRONTEND_GUI_QT6
- last_update_var_label_->setText(QLocale::system().toString(
- QDateTime::fromSecsSinceEpoch(to_time_t(key_.GetLastUpdateTime()))));
-#else
- last_update_var_label_->setText(QLocale::system().toString(
- QDateTime::fromTime_t(to_time_t(key_.GetLastUpdateTime()))));
-#endif
+ last_update_var_label_->setText(
+ QLocale::system().toString(key_.GetLastUpdateTime()));
}
key_size_var_label_->setText(key_size_val);