From kde-commits Thu Mar 13 21:55:53 2008 From: Albert Astals Cid Date: Thu, 13 Mar 2008 21:55:53 +0000 To: kde-commits Subject: KDE/kdelibs/kdeui/widgets Message-Id: <1205445353.320198.10636.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120544542504218 SVN commit 785377 by aacid: chop the suffix before doing the int conversion BUG: 159239 M +3 -1 knuminput.cpp --- trunk/KDE/kdelibs/kdeui/widgets/knuminput.cpp #785376:785377 @@ -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)