• Agata Cacko's avatar
    Refactor KoUnit · 9d5baac8
    Agata Cacko authored
    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
    9d5baac8