summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qabstractspinbox.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-15 09:47:54 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-15 09:47:54 (GMT)
commitfcf91a2d527b393a366c997dd225c076afe34718 (patch)
tree0c8027b9f1059a5c63e777838fb4bf45b72293fc /src/gui/widgets/qabstractspinbox.cpp
parentefa48b0a5dba8c8c93612e534d04b5b04629b75c (diff)
parent1a867a3c692e375565618532b8ca686dab7e7d5e (diff)
downloadQt-fcf91a2d527b393a366c997dd225c076afe34718.zip
Qt-fcf91a2d527b393a366c997dd225c076afe34718.tar.gz
Qt-fcf91a2d527b393a366c997dd225c076afe34718.tar.bz2
Merge commit 'origin/4.6'
Conflicts: src/corelib/io/qfsfileengine.cpp src/network/access/qnetworkrequest.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
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);