aboutsummaryrefslogtreecommitdiffstats
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.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 7d887368a..ef117719c 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -186,7 +186,7 @@ Kirigami.ScrollablePage {
}
Controls.Label {
id: numberText
- text: "#" + dive.number
+ text: "#" + number
font.pointSize: subsurfaceTheme.smallPointSize
color: innerListItem.checked ? subsurfaceTheme.darkerPrimaryTextColor : secondaryTextColor
anchors {
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index ba2a7a407..1911a8f8d 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -255,6 +255,7 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const
localTime.time().toString(prefs.time_format));
}
case IdRole: return d->id;
+ case NumberRole: return d->number;
}
return QVariant();
}
@@ -268,6 +269,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
roles[TripNrDivesRole] = "tripNrDives";
roles[DateTimeRole] = "dateTime";
roles[IdRole] = "id";
+ roles[NumberRole] = "number";
return roles;
}
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h
index 9b39e5513..5bec0de10 100644
--- a/qt-models/divelistmodel.h
+++ b/qt-models/divelistmodel.h
@@ -41,7 +41,8 @@ public:
TripIdRole,
TripNrDivesRole,
DateTimeRole,
- IdRole
+ IdRole,
+ NumberRole,
};
static DiveListModel *instance();