KUnitConversion Review

Kevin Ottens ervin at kde.org
Sun Mar 2 18:58:59 UTC 2014


Hello,

On Thursday 27 February 2014 17:15:56 John Layt wrote:
> I've been reviewing KUnitConversion (KUC for short) and doing some small
> clean-ups, and I'm slowly coming to the conclusion I'm not a fan of the api.
> However it is used in a few places, so rather than try rewrite the api in
> the time remaining, I'll finish up the clean-ups and we can release it as
> is and look to replace it later on.
> 
> The main clean-ups are:
> 
> * Remove use of KCurrencyCode.  Currently it's only used to get the currency
> name of the 50 currencies KUC supports and it seems overkill to keep all
> 207 data files and the api in KUC just for that purpose.  Instead I'd move
> it to kde4support with the rest of KLocale (we also need to move the config
> files from kde-runtime).  This would also remove the dependency on
> KConfigCore.

Nice, please do so before beta 1.

> * Try port away from ki18n to tr().  KUC makes extensive use of ki18nc() and
> ki18ncp(), but I need to check with Chusselove if all the plural
> translations can be handled with Qt or if any are scripted.
> 
> * If we remove those two dependencies then KUC becomes Tier 1, but Tier 2 is
> fine either way.

Would be nice to have it tier 1 if possible indeed. Nice move.

> * Convert more classes to QSharedData
> 
> * Some small API changes

Please also do so before beta 1.

> * Lots of docs clean-ups, code style, etc are needed but can be done later.
> 
> I've done the first step, and I just need a volunteer to do the git magic
> required to:
> 
> * Move kcurrencycode.h and kcurrencycode.cpp including history from
> "kunitconversion/src" to "kde4support/src/kdecore"
> 
> * Move "kde-runtime/localization" and everything in it including history to
> "kde4support/src/localization" or "kde4support/runtime/localization" or
> wherever deemed appropriate
> 
> * Move "kde-runtime/l10n" and everything in it including history into the
> same "localization" folder as above but folder renamed from "l10n" to
> "localization/country" (i.e. at same level as "currency" folder)
> 
> * Make sure the data files are built and installed, but need to think about
> parallel installs with KDE4 data files
> 
> The data file moves are part of the kde-runtime clean-up, but it makes sense
> to do them alongside the code moves.

Any taker for those moves? Alex, I think you already did a couple of those 
right?

> Longer term, I've started work on a new Tier 1 library tentatively called
> KStandards to support the different ISO code standards, and measurement
> standards and conversions.  I've already converted KCurrencyCode to a new
> KCurrency class using json files, and KCountry and KUnits should follow in
> due course to provide a future migration path for apps that need them.

Excellent. Any effort on it should be scheduled at KF 5.1 though.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140302/82a41d95/attachment.sig>


More information about the Kde-frameworks-devel mailing list