aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgKeyTableModel.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-20 19:44:31 +0000
committersaturneric <[email protected]>2024-12-20 19:44:31 +0000
commitee3491860f86c65e6af1bc3549e6228c053e34f3 (patch)
tree8229a918f7ca8f0360bc3df402cbfc763e662a8b /src/core/model/GpgKeyTableModel.cpp
parentfix: try to add all platform plugins for AppImage (diff)
downloadGpgFrontend-ee3491860f86c65e6af1bc3549e6228c053e34f3.tar.gz
GpgFrontend-ee3491860f86c65e6af1bc3549e6228c053e34f3.zip
fix: adjust the width of key list cell correctly
Diffstat (limited to 'src/core/model/GpgKeyTableModel.cpp')
-rw-r--r--src/core/model/GpgKeyTableModel.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/model/GpgKeyTableModel.cpp b/src/core/model/GpgKeyTableModel.cpp
index 8de07b23..edc125ef 100644
--- a/src/core/model/GpgKeyTableModel.cpp
+++ b/src/core/model/GpgKeyTableModel.cpp
@@ -28,8 +28,6 @@
#include "GpgKeyTableModel.h"
-#include <utility>
-
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/model/GpgKey.h"
@@ -62,10 +60,6 @@ auto GpgKeyTableModel::data(const QModelIndex &index,
int role) const -> QVariant {
if (!index.isValid() || buffered_keys_.empty()) return {};
- if (role == Qt::TextAlignmentRole) {
- return Qt::AlignCenter;
- }
-
if (role == Qt::CheckStateRole) {
if (index.column() == 0) {
return key_check_state_[index.row()] ? Qt::Checked : Qt::Unchecked;
@@ -107,7 +101,7 @@ auto GpgKeyTableModel::data(const QModelIndex &index,
return key.GetId();
}
case 7: {
- return key.GetCreateTime();
+ return QLocale().toString(key.GetCreateTime());
}
case 8: {
return key.GetKeyAlgo();