From f1e7adfedcbbd7b39ea5763efaf30d61453e902c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 30 Oct 2019 10:18:15 +0100 Subject: Mobile: don't dereference the dive list model when it's disconnected This avoids a bunch of annoying warnings. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 3172f71b7..a81f7cd23 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -361,7 +361,7 @@ Kirigami.ScrollablePage { } Controls.Label { text: { - diveListView.model.tripShortDate(section) + diveListView.model ? diveListView.model.tripShortDate(section) : "no data model" } color: subsurfaceTheme.primaryTextColor font.pointSize: subsurfaceTheme.smallPointSize @@ -386,7 +386,7 @@ Kirigami.ScrollablePage { Controls.Label { id: sectionText text: { - diveListView.model.tripTitle(section) + diveListView.model ? diveListView.model.tripTitle(section) : "no data model" } wrapMode: Text.WrapAtWordBoundaryOrAnywhere visible: text !== "" -- cgit v1.2.3-70-g09d2