Improve performance of EntryHistoryModel.

This commit is contained in:
Florian Geyer 2012-05-30 17:06:01 +02:00
parent 9f1ab080ee
commit 8d6b200dd7

View File

@ -52,11 +52,10 @@ QVariant EntryHistoryModel::data(const QModelIndex& index, int role) const
return QVariant();
}
if (role == Qt::DisplayRole || role == Qt::UserRole) {
Entry* entry = entryFromIndex(index);
TimeInfo timeInfo = entry->timeInfo();
QDateTime lastModificationLocalTime = timeInfo.lastModificationTime().toLocalTime();
if (role == Qt::DisplayRole || role == Qt::UserRole) {
switch (index.column()) {
case 0:
if (role == Qt::DisplayRole) {