[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/widgets
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2008-03-13 21:55:53
Message-ID: 1205445353.320198.10636.nullmailer () svn ! kde ! org
[Download RAW message or body]

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)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic