From kde-commits Thu Mar 13 21:57:10 2008 From: Albert Astals Cid Date: Thu, 13 Mar 2008 21:57:10 +0000 To: kde-commits Subject: branches/KDE/4.0/kdelibs/kdeui/widgets Message-Id: <1205445430.471649.10743.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120544545404258 SVN commit 785378 by aacid: Backport r785377 **************** chop the suffix before doing the int conversion M +3 -1 knuminput.cpp --- branches/KDE/4.0/kdelibs/kdeui/widgets/knuminput.cpp #785377:785378 @@ -275,7 +275,9 @@ int KIntSpinBox::valueFromText(const QString &text) const { bool ok; - return text.toInt(&ok, d->val_base); + QString theText = text; + if (theText.endsWith(suffix())) theText.chop(suffix().length()); + return theText.toInt(&ok, d->val_base); } void KIntSpinBox::setEditFocus(bool mark)