Bug 439789

Summary: Reorder shown currencies
Product: [Plasma] krunner Reporter: Chris Holland <zrenfire>
Component: converterAssignee: Alexander Lohnau <alexander.lohnau>
Status: REPORTED ---    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Chris Holland 2021-07-12 20:32:54 UTC
https://old.reddit.com/r/kde/comments/oi7vkz/why_do_i_get_2_different_values_when_using/h4ua8q3/

The list is populated with KUnitConverter's `mostCommonUnits()` which is populated with the hardcoded addCommonUnit() or addDefaultUnit().

* https://github.com/KDE/kdeplasma-addons/blob/master/runners/converter/converterrunner.cpp#L186
* https://github.com/KDE/kunitconversion/blob/master/src/currency.cpp

It is then sorted by relevance, with the lowest value up top and the highest (usually YEN) at the bottom.

* https://github.com/KDE/kdeplasma-addons/blob/master/runners/converter/converterrunner.cpp#L108
* match.setRelevance(1.0 - std::abs(std::log10(outputValue.number())) / 50.0);