[kcalc] KF5 port: replace KLocale::formatNumber() with custom code

Review Request #120357 - Created Sept. 24, 2014 and submitted

Christoph Feck
kdeframeworks, kdeutils
jlayt, teran

To remove the last bits of KDELibs4Support in kcalc port, I had to replace KLocale::formatNumber() with a custom function, because I found no way to format arbitrary precision numbers with QLocale.

The groupSize is hardcoded to 3, I did not find a simple way to query QLocale.

The code also replaces all digits with locale digits; not sure if the original KLocale code did the same and if this should be applied to kcalc.

Tested with german locale, which has '.' as groupSeperator, and ',' as decimalPoint.

Evan Teran
Christoph Feck
Review request changed

Status: Closed (submitted)