summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 38c1492f7..22f959cda 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -18,7 +18,15 @@ int LocationInformationModel::rowCount(const QModelIndex &parent) const
QVariant LocationInformationModel::data(const QModelIndex &index, int role) const
{
+ if (!index.isValid())
+ return QVariant();
+ struct dive_site *ds = get_dive_site(index.row());
+ switch(role) {
+ case Qt::DisplayRole : return qPrintable(ds->name);
+ }
+
+ return QVariant();
}
void LocationInformationModel::update()