diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui/dialog/keypair_details/KeyPairDetailTab.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp index b4d2d688..2785603b 100644 --- a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp +++ b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp @@ -35,8 +35,8 @@ namespace GpgFrontend::UI { KeyPairDetailTab::KeyPairDetailTab(const std::string& key_id, QWidget* parent) : QWidget(parent), key_(GpgKeyGetter::GetInstance().GetKey(key_id)) { - LOG(INFO) << key_.GetEmail() << key_.IsPrivateKey() << key_.IsHasMasterKey() - << key_.GetSubKeys()->front().IsPrivateKey(); + SPDLOG_DEBUG(key_.GetEmail(), key_.IsPrivateKey(), key_.IsHasMasterKey(), + key_.GetSubKeys()->front().IsPrivateKey()); owner_box_ = new QGroupBox(_("Owner")); key_box_ = new QGroupBox(_("Primary Key")); @@ -232,20 +232,35 @@ void KeyPairDetailTab::slot_refresh_key_info() { if (to_time_t(boost::posix_time::ptime(key_.GetExpireTime())) == 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 } 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 if (to_time_t(boost::posix_time::ptime(key_.GetLastUpdateTime())) == 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 } key_size_var_label_->setText(key_size_val.c_str()); @@ -269,8 +284,6 @@ void KeyPairDetailTab::slot_refresh_key_info() { } void KeyPairDetailTab::slot_refresh_key() { - LOG(INFO) << _("called"); - // refresh the key GpgKey refreshed_key = GpgKeyGetter::GetInstance().GetKey(key_.GetId()); std::swap(this->key_, refreshed_key); |