summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-20 21:55:59 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-20 21:57:53 -0800
commit8b39352d4ebae623e8956354cdbf2678fbfcb71e (patch)
tree987688a181a8d096b2f71b3ce827ce4d06e307d7
parente22a452cf51297f452766c0cee507b9c589dc3a3 (diff)
downloadsubsurface-8b39352d4ebae623e8956354cdbf2678fbfcb71e.tar.gz
QML UI: only allow valid gas mixes
The input is restricted to EAN100 EANxx (with 'x' one of 0..9) AIR xx/xx (with 'x' one of 0..9) xxx (with 'x' one of 0..9 and the number <= 100) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-mobile/qml/DiveDetailsEdit.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml
index 2c7baf3e1..c2f468d98 100644
--- a/qt-mobile/qml/DiveDetailsEdit.qml
+++ b/qt-mobile/qml/DiveDetailsEdit.qml
@@ -180,6 +180,7 @@ Item {
id: txtGasMix
readOnly: (text == "cannot edit multiple gases" ? true : false)
Layout.fillWidth: true
+ validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/ }
}
MobileComponents.Label {