Bug 439789 - Reorder shown currencies
Summary: Reorder shown currencies
Status: REPORTED
Alias: None
Product: krunner
Classification: Plasma
Component: converter (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-12 20:32 UTC by Chris Holland
Modified: 2021-08-03 02:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);