[KUnitConversion] Currency: Give default values for various currencies

Review Request #122182 - Created Jan. 21, 2015 and updated

Information
Vishesh Handa
kunitconversion
Reviewers
kdeframeworks

The currency converter works by fetching a file from the network every
day and using those conversion values. If network is not available it
will try and use the previous version of that file. If no file
then it will use the default values.

The default values was 1e+99 in all cases. This patch updates it to the
current values as reflected in the file.


  
David Edmundson

+1

it seems better than returning nonsense even if it's slightly out of date.

Martin Flöser

would it be possible to return an error if there is no useable value?

We can update now, but in a month or so the values could be completely different again (c.f. EUR - CHF from two weeks ago and today).

  1. Given the way KUnitConversion is structured it would not be a trivial change.

    Please note that this case will only ever occur if you use currency conversion the first time and there is no network access. The moment we have network access a more accurate currency file will be downloaded.

Loading...