[Converter Runner] Support fractional units
ClosedPublic

Authored by broulik on Aug 1 2019, 7:43 AM.

Details

Summary

BUG: 409216
FIXED-IN: 5.17.0

CHANGELOG: Converter runner can now convert fractional units, such as 3/8"

Test Plan

Typed 3/8", got results for 0,375", i.e. 0.9525cm
Typed `3/8 in, got the same results
Typed 3/8" in cm, got it converted to just centimeters
Typed 3/0", didn't get any results
Typed 3", still works
Can still convert units with a slash, such as "50km/h" = 31mph.
Due to how the runner identifies numbers and units, you cannot have spaces between the slashes, i.e. 3 / 8 in doesn't work

Diff Detail

Repository
R114 Plasma Addons
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Aug 1 2019, 7:43 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 1 2019, 7:43 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Aug 1 2019, 7:43 AM
ngraham accepted this revision.Aug 1 2019, 2:34 PM
ngraham added a subscriber: ngraham.

OMG, this is great stuff! Works great, and code looks sane. I couldn't find any regressions in my testing.

Next, the real trick will be to combine this with calculation support so you can do 5/8" + 3/16". :-)

This revision is now accepted and ready to land.Aug 1 2019, 2:34 PM
This revision was automatically updated to reflect the committed changes.