Extend the documentation on DoubleValidator.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Wed, 18 Jan 2012 01:59:56 +0000 (11:59 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Jan 2012 10:11:02 +0000 (11:11 +0100)
Elaborate on what is valid, intermediate, and invalid.

Task-number: QTBUG-22081
Change-Id: If0ef270eaee60b530fdf6275e36b2208d41c7639
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquicktextinput.cpp

index 309d039..fb96709 100644 (file)
@@ -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.
 */
 
 /*!