kossebau created this revision. kossebau added a reviewer: ilic. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. kossebau requested review of this revision.
REVISION SUMMARY The existing toString/toSymbolString methods use KLocalizedString::subs(), which itself uses QString::arg() for creating the number. Which does not take any QLocale into account. The new overload method with a QLocale argument allow the caller full control over which locale is used. Sadly QLocale does not have a toString() method taking a fieldWidth parameter, so the overloads cannot offer that feature. TEST PLAN Unit tests still pass (need english system locale though, needs separate fix) REPOSITORY R292 KUnitConversion BRANCH addToStringWithLocale REVISION DETAIL https://phabricator.kde.org/D12164 AFFECTED FILES autotests/valuetest.cpp src/unit.cpp src/unit.h src/value.cpp src/value.h To: kossebau, ilic Cc: #frameworks, michaelh, ngraham, bruns