Review Request 114394: KFormat - Add new KFormat class (take 2)
Alex Merry
kde at randomguy3.me.uk
Thu Dec 12 10:52:16 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114394/
-----------------------------------------------------------
(Updated Dec. 12, 2013, 10:52 a.m.)
Status
------
This change has been marked as submitted.
Review request for KDE Frameworks and Albert Astals Cid.
Repository: kdelibs
Description
-------
Replacement for https://git.reviewboard.kde.org/r/114187/; done as two commits. The first is John's original patch, with him listed as the commit author. The second is my modifications.
Hopefully this will be flexible enough for translators. See the "if this does not fit the grammar of your language" comments for possible problem points.
Added Albert, as I would appreciate the view of someone knowledgable about i18n.
-------------------------------------
KLocale offers a number of extra formatting options not yet available
in Qt. The KFormat class adds these options to KCoreAddons:
* formatByteSize()
* formatDuration()
* formatDecimalDuration()
* formatSpelloutDuration()
* formatRelativeDate()
* formatRelativeDateTime()
The KFormat class can be initialised with any QLocale to use in the
date and number formatting, or the default locale can be easily
accessed via KFormat():
QString result = KFormat().formatDuration(1000);
Diffs
-----
tier1/kcoreaddons/autotests/CMakeLists.txt c8043576181e7d06663195d017be930d0bdcbde9
tier1/kcoreaddons/autotests/kformattest.h PRE-CREATION
tier1/kcoreaddons/autotests/kformattest.cpp PRE-CREATION
tier1/kcoreaddons/src/lib/CMakeLists.txt 638525f7b719bcd0bc1dfdf94debd51296521334
tier1/kcoreaddons/src/lib/util/kformat.h PRE-CREATION
tier1/kcoreaddons/src/lib/util/kformat.cpp PRE-CREATION
tier1/kcoreaddons/src/lib/util/kformatprivate.cpp PRE-CREATION
tier1/kcoreaddons/src/lib/util/kformatprivate_p.h PRE-CREATION
Diff: http://git.reviewboard.kde.org/r/114394/diff/
Testing
-------
Autotests pass.
Thanks,
Alex Merry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131212/585c167a/attachment.html>
More information about the Kde-frameworks-devel
mailing list