summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2021-09-22 13:23:53 +0200
committerGitHub <noreply@github.com>2021-09-22 13:23:53 +0200
commitba147c66088df155966f4ace273e4550106e011a (patch)
treed771c00fb568238a57177c23106bf6d3ba97fa8e
parentfe26eab9764735a4e0f0725c110ba5edc5dd1280 (diff)
parentaa31642430d69463138b7275fa019696d52dae44 (diff)
Merge pull request #572 from nfetisov/key_dates-571
Fix keys created/expires dates in the users dialog window (fix: 571)
-rw-r--r--src/usersdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usersdialog.cpp b/src/usersdialog.cpp
index e8ca418e..b89da883 100644
--- a/src/usersdialog.cpp
+++ b/src/usersdialog.cpp
@@ -150,11 +150,11 @@ void UsersDialog::populateList(const QString &filter) {
QString userText = user.name + "\n" + user.key_id;
if (user.created.toSecsSinceEpoch() > 0) {
userText += " " + tr("created") + " " +
- user.created.toString(QLocale::system().toString(QDate::currentDate(), QLocale::ShortFormat));
+ QLocale::system().toString(user.created, QLocale::ShortFormat);
}
if (user.expiry.toSecsSinceEpoch() > 0)
userText += " " + tr("expires") + " " +
- user.expiry.toString(QLocale::system().toString(QDate::currentDate(), QLocale::ShortFormat));
+ QLocale::system().toString(user.expiry, QLocale::ShortFormat);
auto *item = new QListWidgetItem(userText, ui->listWidget);
item->setCheckState(user.enabled ? Qt::Checked : Qt::Unchecked);
item->setData(Qt::UserRole, QVariant::fromValue(&user));