Refactor KoUnit
Summary:
This commit fixes two problems in KoUnit:
(1) two functions named differently while doing
nearly exactly the same thing (ptToUnit, toUserValue)
and the difference in the name or arguments of functions
not showing the difference in the results,
(2) repeated constant values in functions
called to[Unit] (i.e. toMillimeters).
This commit is not to cause any difference in behaviour
(including in particular converting and rounding values)
and contains unit tests to test that.
Test Plan:
- created unit test to test the difference in conversions
(should not none).
- all the places where the difference in functions naming
caused changes in files other than [Test]KoUnit.h/.cpp
Reviewers: Krita, rempt
Reviewed By: Krita, rempt
Subscribers: rempt
Tags: Krita
Differential Revision: https://phabricator.kde.org/D19537