Linux Distro: openSUSE Tumbleweed Plasma version: 5.9.4 Summary: I often find myself wanting to convert between MPa and PSI and vice versa, via KRunner. Simply writing the thing to be converted doesn't show MPa or PSI in the list of displayed conversions; you need to explicitly request it ("1900 PSI in MPa or "13.1 MPa in PSI"). Steps to reproduce: 1. Activate KRunner 2. Type in "1900 PSI" or "13.1 MPa" Actual results: Krunner shows conversions for atmospheres, bars, inches of mercury, hectopascals, and pascals. Expected results: There should be a conversion to megapascals (MPa) or pounds per square foot (PSI)--both of which are commonly used in the construction trades. Additional information: IMHO MPa and PSI are more useful than hectopascals, and they should replace it. I'd be happy to submit a patch, but I wasn't able to find the source for this runner.
Re-assigning to KUnitconversion framework which the units runner uses, it just asks it "what are the common units for 'pressure'" and then it returns these, and while it knows MPa and psi they're not flagged as "common" in there.
Btw if you want to give it a go, you can find the definitions for pressure in kunitconversion/src/pressure.cpp, note the addUnit vs addCommonUnit
Ok great, I can submit a patch for that! Thanks for your help!
Created attachment 105176 [details] Patch
Hektopascal certainly is a very common unit in meteorology (at least here in Germany).
Created attachment 106772 [details] Patch Here's a new patch that doesn't change anything for HPa, and just marks MPa and PSI as common.
Thanks for your patch. Please upload it to phabricator.kde.org for developers to review it - patches on Bugzilla get easily overlooked.
Thanks. Here you go: https://phabricator.kde.org/D6808
Git commit 11a8590d0e83a474d76aa6f2d90b0d4b5fadaebc by Albert Astals Cid, on behalf of Nathaniel Graham. Committed on 22/07/2017 at 07:51. Pushed by aacid into branch 'master'. Mark MPa and PSI as common units Differential Revision: https://phabricator.kde.org/D6808 M +2 -2 src/pressure.cpp https://commits.kde.org/kunitconversion/11a8590d0e83a474d76aa6f2d90b0d4b5fadaebc