Bug 341072

Summary: Missing imperial gallons and US pints
Product: [Unmaintained] kdelibs Reporter: Alan Prescott <alanjprescott>
Component: kunitconverterAssignee: Petri Damstén <petri.damsten>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 4.14.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alan Prescott 2014-11-18 08:43:56 UTC
KUnitConverter appears to be missing Imperial gallons and US pints. and it also has a single entry for cup which differ in the US, UK and metric sizes
There's also only a single cup entry which is not specified as to whether it's metric, US or UK.
FYI
  1 US pint = 0.83267384 Imperial pints
  1 US gallon = 0.83267384 Imperial gallons
  1 US cup = 1⁄16 US gallon
  1 UK cup = ½ Imperial pint = 284.1305ml
  1 metric cup = 250ml

I'm seeing this in the Unit Converter widget and I've reported it to the maintainer (Gerhard Gappmeier) who says that the widget uses KUnitConverter so I'm reporting this here.


Reproducible: Always
Comment 1 Nate Graham 2020-04-19 22:53:50 UTC
These units were added more than a year ago, in Frameworks 5.53.
Comment 2 Nate Graham 2020-04-20 21:18:02 UTC
Git commit be0ef896c3f3c9114d625b5ad757849dc7f5b30a by Nate Graham, on behalf of Felix Riiga.
Committed on 20/04/2020 at 21:17.
Pushed by ngraham into branch 'master'.

Add imperial gallon and US pint

Summary:
Adds imperial gallon and US pint as requested in a bug report.

Test Plan: I haven't figured out how to test the changes, so any directions are welcome. I've tried LD_PRELOAD with the compiled library when launching KRunner to no avail.

Reviewers: #frameworks, ngraham

Reviewed By: ngraham

Subscribers: bruns, ngraham, kde-frameworks-devel

Tags: #frameworks

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

M  +1    -1    src/fuel_efficiency.cpp
M  +2    -0    src/unit.h
M  +18   -0    src/volume.cpp

https://commits.kde.org/kunitconversion/be0ef896c3f3c9114d625b5ad757849dc7f5b30a