Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove Last Accessed from GUI
* Closes #2005
  • Loading branch information
droidmonkey committed Oct 26, 2025
commit 50a7f233ad078d0f0336cf62c19cf6853325375b
16 changes: 0 additions & 16 deletions share/translations/keepassxc_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3875,14 +3875,6 @@ Supported extensions are: %1.</source>
<source>Datetime modified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Accessed:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Datetime accessed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uuid:</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4256,10 +4248,6 @@ Would you like to overwrite the existing attachment?</source>
<source>Modified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Accessed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attachments</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4296,10 +4284,6 @@ Would you like to overwrite the existing attachment?</source>
<source>Last modification date</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Last access date</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attached files</source>
<translation type="unfinished"></translation>
Expand Down
1 change: 0 additions & 1 deletion src/gui/EditWidgetProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ void EditWidgetProperties::setFields(const TimeInfo& timeInfo, const QUuid& uuid
static const QString timeFormat("d MMM yyyy HH:mm:ss");
m_ui->modifiedEdit->setText(timeInfo.lastModificationTime().toLocalTime().toString(timeFormat));
m_ui->createdEdit->setText(timeInfo.creationTime().toLocalTime().toString(timeFormat));
m_ui->accessedEdit->setText(timeInfo.lastAccessTime().toLocalTime().toString(timeFormat));
m_ui->uuidEdit->setText(uuid.toRfc4122().toHex());
}

Expand Down
25 changes: 2 additions & 23 deletions src/gui/EditWidgetProperties.ui
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelAccessed">
<property name="text">
<string>Accessed:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="accessedEdit">
<property name="accessibleName">
<string>Datetime accessed</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="2" column="0">
<widget class="QLabel" name="labelUuid">
<property name="text">
<string>Uuid:</string>
Expand All @@ -113,7 +93,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="2" column="1">
<widget class="QLineEdit" name="uuidEdit">
<property name="accessibleName">
<string>Unique ID</string>
Expand Down Expand Up @@ -204,7 +184,6 @@
<tabstops>
<tabstop>createdEdit</tabstop>
<tabstop>modifiedEdit</tabstop>
<tabstop>accessedEdit</tabstop>
<tabstop>uuidEdit</tabstop>
</tabstops>
<resources/>
Expand Down
9 changes: 0 additions & 9 deletions src/gui/entry/EntryModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
case Modified:
result = Clock::toString(entry->timeInfo().lastModificationTime().toLocalTime());
return result;
case Accessed:
result = Clock::toString(entry->timeInfo().lastAccessTime().toLocalTime());
return result;
case Attachments: {
// Display comma-separated list of attachments
QList<QString> attachments = entry->attachments()->keys();
Expand Down Expand Up @@ -266,8 +263,6 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
return entry->timeInfo().creationTime();
case Modified:
return entry->timeInfo().lastModificationTime();
case Accessed:
return entry->timeInfo().lastAccessTime();
case Paperclip:
// Display entries with attachments above those without when
// sorting ascendingly (and vice versa when sorting descendingly)
Expand Down Expand Up @@ -400,8 +395,6 @@ QVariant EntryModel::headerData(int section, Qt::Orientation orientation, int ro
return tr("Created");
case Modified:
return tr("Modified");
case Accessed:
return tr("Accessed");
case Attachments:
return tr("Attachments");
case Size:
Expand Down Expand Up @@ -441,8 +434,6 @@ QVariant EntryModel::headerData(int section, Qt::Orientation orientation, int ro
return tr("Creation date");
case Modified:
return tr("Last modification date");
case Accessed:
return tr("Last access date");
case Attachments:
return tr("Attached files");
case Size:
Expand Down
2 changes: 1 addition & 1 deletion src/gui/entry/EntryModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class EntryModel : public QAbstractTableModel
Expires = 6,
Created = 7,
Modified = 8,
Accessed = 9,
Accessed = 9, // Kept for compatibility
Paperclip = 10,
Attachments = 11,
Totp = 12,
Expand Down
15 changes: 10 additions & 5 deletions src/gui/entry/EntryView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,16 @@ EntryView::EntryView(QWidget* parent)
m_columnActions->setExclusive(false);
for (int visualIndex = 0; visualIndex < header()->count(); ++visualIndex) {
int logicalIndex = header()->logicalIndex(visualIndex);
QString caption = m_model->headerData(logicalIndex, Qt::Horizontal, Qt::DisplayRole).toString();
if (caption.isEmpty()) {
caption = m_model->headerData(logicalIndex, Qt::Horizontal, Qt::ToolTipRole).toString();
auto caption = m_model->headerData(logicalIndex, Qt::Horizontal, Qt::DisplayRole);
if (!caption.isValid()) {
caption = m_model->headerData(logicalIndex, Qt::Horizontal, Qt::ToolTipRole);
if (!caption.isValid()) {
// Ignored column, skip it
continue;
}
}

auto action = m_headerMenu->addAction(caption);
auto action = m_headerMenu->addAction(caption.toString());
action->setCheckable(true);
action->setData(logicalIndex);
m_columnActions->addAction(action);
Expand Down Expand Up @@ -478,7 +482,6 @@ void EntryView::resetViewToDefaults()
header()->hideSection(EntryModel::Password);
header()->hideSection(EntryModel::Expires);
header()->hideSection(EntryModel::Created);
header()->hideSection(EntryModel::Accessed);
header()->hideSection(EntryModel::Attachments);
header()->hideSection(EntryModel::Size);
header()->hideSection(EntryModel::PasswordStrength);
Expand Down Expand Up @@ -515,6 +518,8 @@ void EntryView::resetViewToDefaults()
void EntryView::onHeaderChanged()
{
m_model->setBackgroundColorVisible(isColumnHidden(EntryModel::Color));
// Force hide accessed column
header()->hideSection(EntryModel::Accessed);
}

void EntryView::showEvent(QShowEvent* event)
Expand Down