[applets/calculator] Use Qt's in-built number formatting

Authored by davidedmundson on Jan 14 2020, 11:00 PM.

Description

[applets/calculator] Use Qt's in-built number formatting

Summary:
Gets rid of a load of code.
Correctly handles floating point issues.
Results are correct.

Potentially this inadvertedly introduces a behaviour change
of including group separators depending on locale. This could be
considered a good thing, but if it's problematic we can always add a
.replace() at the end of this line.

BUG: 410988

Test Plan:
62 * 1.3 = 80.6

100000000 * 5000000 = 5e+17
(with whatever the right number of zeroes is)

42 * 1.33333 = 6.6666665

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D26676

Details

Committed
davidedmundsonJan 15 2020, 12:36 AM
Differential Revision
D26676: [applets/calculator] Use Qt's in-built number formatting
Parents
R114:3984da31e33e: Update my email address
Branches
Unknown
Tags
Unknown