aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickvalidator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickvalidator.cpp')
-rw-r--r--src/quick/util/qquickvalidator.cpp57
1 files changed, 13 insertions, 44 deletions
diff --git a/src/quick/util/qquickvalidator.cpp b/src/quick/util/qquickvalidator.cpp
index c309460263..d5d584cccb 100644
--- a/src/quick/util/qquickvalidator.cpp
+++ b/src/quick/util/qquickvalidator.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qquickvalidator_p.h"
@@ -48,6 +12,7 @@ QT_BEGIN_NAMESPACE
\instantiates QIntValidator
\inqmlmodule QtQuick
\ingroup qtquick-text-utility
+ \ingroup qtquick-text-validators
\brief Defines a validator for integer values.
The IntValidator type provides a validator for integer values.
@@ -56,6 +21,8 @@ QT_BEGIN_NAMESPACE
interpret the number and will accept locale specific digits, group separators, and positive
and negative signs. In addition, IntValidator is always guaranteed to accept a number
formatted according to the "C" locale.
+
+ \sa DoubleValidator, RegularExpressionValidator, {Validating Input Text}
*/
QQuickIntValidator::QQuickIntValidator(QObject *parent)
@@ -111,6 +78,7 @@ void QQuickIntValidator::resetLocaleName()
\instantiates QDoubleValidator
\inqmlmodule QtQuick
\ingroup qtquick-text-utility
+ \ingroup qtquick-text-validators
\brief Defines a validator for non-integer numbers.
The DoubleValidator type provides a validator for non-integer numbers.
@@ -131,6 +99,8 @@ void QQuickIntValidator::resetLocaleName()
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.
+
+ \sa IntValidator, RegularExpressionValidator, {Validating Input Text}
*/
QQuickDoubleValidator::QQuickDoubleValidator(QObject *parent)
@@ -192,12 +162,8 @@ void QQuickDoubleValidator::resetLocaleName()
The possible values for this property are:
- \list
- \li DoubleValidator.StandardNotation
- \li DoubleValidator.ScientificNotation (default)
- \endlist
-
- If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part (e.g. 1.5E-2).
+ \value DoubleValidator.StandardNotation only decimal numbers with optional sign (e.g. \c -0.015)
+ \value DoubleValidator.ScientificNotation (default) the written number may have an exponent part (e.g. \c 1.5E-2)
*/
/*!
@@ -205,11 +171,14 @@ void QQuickDoubleValidator::resetLocaleName()
\instantiates QRegularExpressionValidator
\inqmlmodule QtQuick
\ingroup qtquick-text-utility
+ \ingroup qtquick-text-validators
\brief Provides a string validator.
\since 5.14
The RegularExpressionValidator type provides a validator, that counts as valid any string which
matches a specified regular expression.
+
+ \sa IntValidator, DoubleValidator, {Validating Input Text}
*/
/*!
\qmlproperty regularExpression QtQuick::RegularExpressionValidator::regularExpression