diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-10-10 10:01:02 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-10 06:27:21 -0700 |
commit | 8034af5ad5726846ea0d227d8fa3d13aebde7e36 (patch) | |
tree | 67a495cb6febd699478dba092fba1b5d15cd9db5 /mobile-widgets/qml/DownloadFromDiveComputer.qml | |
parent | 8686b53c3735b0937e585ca42afc1279558e5162 (diff) | |
download | subsurface-8034af5ad5726846ea0d227d8fa3d13aebde7e36.tar.gz |
QML UI: do not try to download from DC with empty vendor/product
Disable the Download button when one of the fields vendor, product,
connection is not filled in. The app will crash when trying.
In addition, make the underlying core code to actual download
more safe by checking this, and silently fail instead of crash.
And, yes, this is a double fix in this scenario, but the core code
is used in more places, so better safe than sorry.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml')
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 8a8bf2d74..729fe3c20 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -273,6 +273,8 @@ Kirigami.Page { SsrfButton { id: download text: qsTr("Download") + enabled: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 && + comboConnection.currentIndex != -1 onClicked: { text = qsTr("Retry") // strip any BT Name from the address |