summaryrefslogtreecommitdiff
path: root/src/gui/widgets/qabstractspinbox.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-12-16 09:37:34 +0100
committeraxis <qt-info@nokia.com>2009-12-16 09:37:34 +0100
commit6e527912d719b0448b91eba1d6a99b9cbe58170a (patch)
tree17ba94b2af34ba2ab953fbd7be84955bdea39370 /src/gui/widgets/qabstractspinbox.cpp
parent8152bd167c1a728c54a9976297bb53e09d131d66 (diff)
parenta9d4faa330698a7972c7fa4b3582fb20548b32f6 (diff)
downloadqt4-tools-6e527912d719b0448b91eba1d6a99b9cbe58170a.tar.gz
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-s60
Conflicts: src/s60installs/bwins/QtGuiu.def
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 8257a16ede..c036c32f72 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -1901,8 +1901,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);