Review Request 120087: Expose DurationFormatOption from KLocale
Marco Martin
notmart at gmail.com
Mon Sep 8 09:06:44 UTC 2014
> On Sept. 7, 2014, 1:53 p.m., David Edmundson wrote:
> > src/qmlcontrols/kcoreaddons/formats.cpp, line 34
> > <https://git.reviewboard.kde.org/r/120087/diff/2/?file=310261#file310261line34>
> >
> > DurationFormatOption -> DurationFormatOptions ?
> >
> > as we want the flags not the enum.
>
> Kai Uwe Broulik wrote:
> I tried with the QFlags but passing it from QML to C++ doesn't work somehow :/
>
> > console.log(KCoreAddons.FormatTypes.HideSeconds) // yields 4
>
> and then in the C++ part I just get an empty QFlags(). I did register the metatype.
>
> However, having an int in the signature and then static_cast<KFormat::DurationFormatOption> works but is ugly :(
mmeeh, this should be properly solved, i wouldn't go with this workaround :/
- Marco
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120087/#review65989
-----------------------------------------------------------
On Sept. 7, 2014, 1:24 p.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120087/
> -----------------------------------------------------------
>
> (Updated Sept. 7, 2014, 1:24 p.m.)
>
>
> Review request for Plasma.
>
>
> Repository: kdeclarative
>
>
> Description
> -------
>
> This patch exposes the duration format options from KLocale's formatDuration in KDeclarative.
>
> This alows to show a time in eg. hh:mm instead of the default hh:mm:ss
>
>
> Diffs
> -----
>
> src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp 9dc17fa
> src/qmlcontrols/kcoreaddons/formats.h 275f351
> src/qmlcontrols/kcoreaddons/formats.cpp c853e97
>
> Diff: https://git.reviewboard.kde.org/r/120087/diff/
>
>
> Testing
> -------
>
> Adjusted battery monitor, shows proper value.
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140908/463d6e15/attachment.html>
More information about the Plasma-devel
mailing list