diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-22 16:20:55 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-26 11:38:26 -0700 |
commit | 4e583f91206a7f62c73bed58a338ebc28620774c (patch) | |
tree | edef846e4a13663d15f01fb3fd81a07a959b4411 | |
parent | face9ba1a8aa2caae065b677885515b94e05e0ae (diff) | |
download | subsurface-4e583f91206a7f62c73bed58a338ebc28620774c.tar.gz |
Mobile: avoid dereferencing undefined values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 18b51d70e..07fd7ba4e 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -155,7 +155,7 @@ Kirigami.ScrollablePage { anchors.left: leftBarDive.right Controls.Label { id: locationText - text: location + text: (undefined !== location) ? location : "" font.weight: Font.Bold font.pointSize: subsurfaceTheme.regularPointSize elide: Text.ElideRight @@ -179,14 +179,14 @@ Kirigami.ScrollablePage { Controls.Label { id: dateLabel - text: dateTime + text: (undefined !== dateTime) ? dateTime : "" width: Math.max(locationText.width * 0.45, paintedWidth) // helps vertical alignment throughout listview font.pointSize: subsurfaceTheme.smallPointSize color: innerListItem.checked ? subsurfaceTheme.darkerPrimaryTextColor : secondaryTextColor } // let's try to show the depth / duration very compact Controls.Label { - text: depthDuration + text: (undefined !== depthDuration) ? depthDuration : "" width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview font.pointSize: subsurfaceTheme.smallPointSize color: innerListItem.checked ? subsurfaceTheme.darkerPrimaryTextColor : secondaryTextColor |