summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qabstractspinbox.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-12-15 14:40:07 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-12-15 14:40:07 (GMT)
commitd869ec981447bc6d590954a939f18b5d37ebb6cd (patch)
treeb2b0bf2ccd1f5d886340475b70c9a91b2e456ebd /src/gui/widgets/qabstractspinbox.cpp
parent2ba459c2adcaa4d0f865956048ac2e24f3fe6924 (diff)
parent0b402f10a26115332ae72bbf263fd15c8354ecb9 (diff)
downloadQt-d869ec981447bc6d590954a939f18b5d37ebb6cd.zip
Qt-d869ec981447bc6d590954a939f18b5d37ebb6cd.tar.gz
Qt-d869ec981447bc6d590954a939f18b5d37ebb6cd.tar.bz2
Merge remote branch 'mainline/4.6' into 4.6
Diffstat (limited to 'src/gui/widgets/qabstractspinbox.cpp')
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index a18af4f..c015589 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -1856,8 +1856,10 @@ QValidator::State QSpinBoxValidator::validate(QString &input, int &pos) const
if (dptr->specialValueText.size() > 0 && input == dptr->specialValueText)
return QValidator::Acceptable;
- if (!dptr->prefix.isEmpty() && !input.startsWith(dptr->prefix))
+ if (!dptr->prefix.isEmpty() && !input.startsWith(dptr->prefix)) {
input.prepend(dptr->prefix);
+ pos += dptr->prefix.length();
+ }
if (!dptr->suffix.isEmpty() && !input.endsWith(dptr->suffix))
input.append(dptr->suffix);