summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index b41a16003..ba2a7a407 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -254,6 +254,7 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const
return QStringLiteral("%1 %2").arg(localTime.date().toString(prefs.date_format_short),
localTime.time().toString(prefs.time_format));
}
+ case IdRole: return d->id;
}
return QVariant();
}
@@ -266,6 +267,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
roles[TripIdRole] = "tripId";
roles[TripNrDivesRole] = "tripNrDives";
roles[DateTimeRole] = "dateTime";
+ roles[IdRole] = "id";
return roles;
}