<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Friedrich,<br>
<br>
Good initiative !<br>
<br>
Concerning Skrooge:<br>
1- Skrooge has been ported to Qt5/Kf5 but still need
KDELibs4Support.<br>
2- We don't use KLocale::readMoney() because amounts are entered
like this:<br>
<img src="cid:part1.00030407.06060902@mankowski.fr" alt=""><br>
2- We use KLocale::formatMoney because we can control the number of
digits.<br>
3- From KDELibs4Support, we use KCurrencyCode too to get information
about existing currencies. This is not available in Qt5.<br>
<br>
I don't know activities to improve QLocale.<br>
<br>
Regards.<br>
Stéphane<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 06/01/2016 08:12, Friedrich W. H.
Kossebau a écrit :<br>
</div>
<blockquote cite="mid:1707262.70RkHWTLFO@klux.site" type="cite">
<pre wrap="">Hi developers of finance apps & Calligra Sheets & Calligra Plan,
(please keep cross-posting to both ml for now)
I (not only with my Calligra developer hat on) would like to collect
experiences and ideas for conversion of curreny values to and from
strings when using Qt5/KF5, especially when porting from kdelibs4's
KLocale.
PROBLEM
QLocale is rather limited (as of Qt 5.5):
- no currency string parsing method
- string formatting method toCurrencyString() does not allow
to control precision
KLocale and its currency related methods seem the last blocker to get
rid of kdelibs4support in Calligra in the Qt5/KF5 port. Plan uses them
for handling the costs of resources, and Sheets for the currency
formatted cells. And both limitations are a blocker.
APPROACHES
Long term ideally QLocale gets support in its API for that. So we
developers of currency data handling software should organize and
draft an API.
First and short term though, until some released & wide-spread Qt
version has the improved QLocale, I am looking for a solution
independent of QLocale.
Most obvious might be to duplicate all currency things from KLocale,
which would also include duplicating the database with all currency
formatting data. This is what I would plan to do if there is no better
idea.
Especially the database duplication is painful though, I would like to
avoid at least that if possible.
QUESTIONS
How have developers of e.g. Skrooge & KMyMoney approached the issue of
conversion of currency values to/from strings?
Do you know about any activities to improve QLocale here?
Seems that Calligra apps Plan & Sheets are the only KDE apps using
KLocale::readMoney() ?
<a class="moz-txt-link-freetext" href="https://lxr.kde.org/ident?v=stable-qt4&_i=readMoney&_remember=1">https://lxr.kde.org/ident?v=stable-qt4&_i=readMoney&_remember=1</a>
But KLocale::formatMoney() might be used by KMyMoney, Skrooge, Kraft &
others (did not check though if not custom code):
<a class="moz-txt-link-freetext" href="https://lxr.kde.org/ident?v=stable-qt4&_i=formatMoney&_remember=1">https://lxr.kde.org/ident?v=stable-qt4&_i=formatMoney&_remember=1</a>
Cheers
Friedrich
_______________________________________________
Kde-finance-apps mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kde-finance-apps@kde.org">Kde-finance-apps@kde.org</a>
<a class="moz-txt-link-freetext" href="https://mail.kde.org/mailman/listinfo/kde-finance-apps">https://mail.kde.org/mailman/listinfo/kde-finance-apps</a>
</pre>
</blockquote>
<br>
</body>
</html>