summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DiveList.qml2
-rw-r--r--qt-models/divelistmodel.cpp2
-rw-r--r--qt-models/divelistmodel.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index ef117719c..99a93be2a 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -147,7 +147,7 @@ Kirigami.ScrollablePage {
anchors.left: leftBarDive.right
Controls.Label {
id: locationText
- text: dive.location
+ text: location
font.weight: Font.Bold
font.pointSize: subsurfaceTheme.regularPointSize
elide: Text.ElideRight
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index 1911a8f8d..05cf987c9 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -256,6 +256,7 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const
}
case IdRole: return d->id;
case NumberRole: return d->number;
+ case LocationRole: return get_dive_location(d);
}
return QVariant();
}
@@ -270,6 +271,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
roles[DateTimeRole] = "dateTime";
roles[IdRole] = "id";
roles[NumberRole] = "number";
+ roles[LocationRole] = "location";
return roles;
}
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h
index 5bec0de10..9e706dd3d 100644
--- a/qt-models/divelistmodel.h
+++ b/qt-models/divelistmodel.h
@@ -43,6 +43,7 @@ public:
DateTimeRole,
IdRole,
NumberRole,
+ LocationRole,
};
static DiveListModel *instance();