mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 21:04:19 -05:00
Improve performance of EntryHistoryModel.
This commit is contained in:
parent
9f1ab080ee
commit
8d6b200dd7
@ -52,11 +52,10 @@ QVariant EntryHistoryModel::data(const QModelIndex& index, int role) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (role == Qt::DisplayRole || role == Qt::UserRole) {
|
||||||
Entry* entry = entryFromIndex(index);
|
Entry* entry = entryFromIndex(index);
|
||||||
TimeInfo timeInfo = entry->timeInfo();
|
TimeInfo timeInfo = entry->timeInfo();
|
||||||
QDateTime lastModificationLocalTime = timeInfo.lastModificationTime().toLocalTime();
|
QDateTime lastModificationLocalTime = timeInfo.lastModificationTime().toLocalTime();
|
||||||
|
|
||||||
if (role == Qt::DisplayRole || role == Qt::UserRole) {
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user