summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qspinbox.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2013-12-02 13:08:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-05 23:57:53 +0100
commitb9c8073230dfd90962188a24f78d4f4157f9eaad (patch)
tree63bedf8b1778417cf1088d1343db3814c686296b /src/widgets/widgets/qspinbox.cpp
parenteb7b140d6d2d1aba9459fd717f5abe5794acba68 (diff)
QSpinBox: allow positive values to be entered with the '+' prefix.
The code was there to do it, but it was using minimumValue instead of maximumValue to test if the '+' should be allowed. Task-number: QTBUG-20691 [ChangeLog][QtWidgets][QSpinBox] Entering positive values with the '+' prefix is now allowed. Change-Id: Iff62d073e350dc9a33b7e06e4b492048c74437c4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qspinbox.cpp')
-rw-r--r--src/widgets/widgets/qspinbox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index bf4e130d4e..2a34451408 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -1040,7 +1040,7 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
if (max != min && (copy.isEmpty()
|| (min < 0 && copy == QLatin1String("-"))
- || (min >= 0 && copy == QLatin1String("+")))) {
+ || (max >= 0 && copy == QLatin1String("+")))) {
state = QValidator::Intermediate;
QSBDEBUG() << __FILE__ << __LINE__<< "num is set to" << num;
} else if (copy.startsWith(QLatin1Char('-')) && min >= 0) {