diff options
Diffstat (limited to 'src/gui/util/qvalidator.h')
-rw-r--r-- | src/gui/util/qvalidator.h | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/gui/util/qvalidator.h b/src/gui/util/qvalidator.h index f0e72e3814..7e72a60f24 100644 --- a/src/gui/util/qvalidator.h +++ b/src/gui/util/qvalidator.h @@ -44,7 +44,6 @@ #include <QtGui/qtguiglobal.h> #include <QtCore/qobject.h> #include <QtCore/qstring.h> -#include <QtCore/qregexp.h> #if QT_CONFIG(regularexpression) # include <QtCore/qregularexpression.h> #endif @@ -105,7 +104,7 @@ public: void setBottom(int); void setTop(int); - virtual void setRange(int bottom, int top); + void setRange(int bottom, int top); int bottom() const { return b; } int top() const { return t; } @@ -120,8 +119,6 @@ private: int t; }; -#ifndef QT_NO_REGEXP - class QDoubleValidatorPrivate; class Q_GUI_EXPORT QDoubleValidator : public QValidator @@ -144,7 +141,7 @@ public: Q_ENUM(Notation) QValidator::State validate(QString &, int &) const override; - virtual void setRange(double bottom, double top, int decimals = 0); + void setRange(double bottom, double top, int decimals = 0); void setBottom(double); void setTop(double); void setDecimals(int); @@ -170,33 +167,6 @@ private: int dec; }; - -class Q_GUI_EXPORT QRegExpValidator : public QValidator -{ - Q_OBJECT - Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp NOTIFY regExpChanged) - -public: - explicit QRegExpValidator(QObject *parent = nullptr); - explicit QRegExpValidator(const QRegExp& rx, QObject *parent = nullptr); - ~QRegExpValidator(); - - virtual QValidator::State validate(QString& input, int& pos) const override; - - void setRegExp(const QRegExp& rx); - const QRegExp& regExp() const { return r; } - -Q_SIGNALS: - void regExpChanged(const QRegExp& regExp); - -private: - Q_DISABLE_COPY(QRegExpValidator) - - QRegExp r; -}; - -#endif // QT_NO_REGEXP - #if QT_CONFIG(regularexpression) class QRegularExpressionValidatorPrivate; @@ -211,7 +181,7 @@ public: explicit QRegularExpressionValidator(const QRegularExpression &re, QObject *parent = nullptr); ~QRegularExpressionValidator(); - virtual QValidator::State validate(QString &input, int &pos) const override; + QValidator::State validate(QString &input, int &pos) const override; QRegularExpression regularExpression() const; |