use KLocale::positive/negativeSign in windowgeometry effect

BUG: 273169
FIXED-IN: 4.7
This commit is contained in:
Thomas Lübking 2011-05-13 17:37:07 +02:00
parent 234ec644d2
commit 580aa665c9

View file

@ -119,9 +119,17 @@ void WindowGeometry::slotWindowFinishUserMovedResized(EffectWindow *w)
static inline QString number(int n)
{
if (n >= 0)
return '+' + QString::number(n);
return QString::number(n); // "-" is auto-applied
QString sign;
if (n >= 0) {
sign = KGlobal::locale()->positiveSign();
if (sign.isEmpty()) sign = "+";
}
else {
n = -n;
sign = KGlobal::locale()->negativeSign();
if (sign.isEmpty()) sign = "-";
}
return sign + QString::number(n);
}