From: Andrew den Exter Date: Wed, 18 Jan 2012 01:59:56 +0000 (+1000) Subject: Extend the documentation on DoubleValidator. X-Git-Tag: qt-v5.0.0-alpha1~649 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3121a0d41006d4b5f12c6a119b99f9917ceea760;p=profile%2Fivi%2Fqtdeclarative.git Extend the documentation on DoubleValidator. Elaborate on what is valid, intermediate, and invalid. Task-number: QTBUG-22081 Change-Id: If0ef270eaee60b530fdf6275e36b2208d41c7639 Reviewed-by: Martin Jones --- diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 309d039..fb96709 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -842,6 +842,23 @@ void QQuickTextInput::setAutoScroll(bool b) \ingroup qml-basic-visual-elements This element provides a validator for non-integer numbers. + + Input is accepted if it contains a double that is within the valid range + and is in the correct format. + + Input is accepected but invalid if it contains a double that is outside + the range or is in the wrong format; e.g. with too many digits after the + decimal point or is empty. + + Input is rejected if it is not a double. + + Note: If the valid range consists of just positive doubles (e.g. 0.0 to + 100.0) and input is a negative double then it is rejected. If \l notation + is set to DoubleValidator.StandardNotation, and the input contains more + digits before the decimal point than a double in the valid range may have, + it is also rejected. If \l notation is DoubleValidator.ScientificNotation, + and the input is not in the valid range, it is accecpted but invalid. The + value may yet become valid by changing the exponent. */ /*!