Review Request 120087: Expose DurationFormatOption from KLocale

David Edmundson david at davidedmundson.co.uk
Sun Sep 7 13:56:44 UTC 2014



> On Sept. 7, 2014, 9:52 a.m., David Edmundson wrote:
> > src/qmlcontrols/kcoreaddons/formats.h, line 33
> > <https://git.reviewboard.kde.org/r/120087/diff/1/?file=310244#file310244line33>
> >
> >     Rather than redeclaring the enum could we add Q_GADGET to kformat.h then export it to QML as an uncreatale type?
> 
> Marco Martin wrote:
>     may be a good idea, tough is a bit weird that a wrapper is already there (Formats) then mixed from enums of non wrapped.
>     One thing I am not sure: does Q_GADGET adds significant overhead in memory terms?
>     but overall I am favorable to trying directly use kformat enums as a gadget
> 
> Aleix Pol Gonzalez wrote:
>     +1
>     
>     AFAIK, Q_GADGET is just the exported metadata, it should be fine. I don't have the numbers though.
>     Either way, I think that Q_GADGET doesn't add a payload per instance, like QObject does.

Q_GADGET == run moc even though you're not a sublass of QObject.


As I was curious too it generates: http://paste.kde.org/ph0uqezae


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120087/#review65965
-----------------------------------------------------------


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/20140907/8127dc58/attachment.html>


More information about the Plasma-devel mailing list