Review Request 122200: Add overload method for Formats::formatDuration taking int

Martin Klapetek martin.klapetek at gmail.com
Thu Jan 22 16:09:05 UTC 2015



> On Jan. 22, 2015, 5:02 p.m., David Edmundson wrote:
> > src/qmlcontrols/kcoreaddons/formats.h, line 92
> > <https://git.reviewboard.kde.org/r/122200/diff/3/?file=344270#file344270line92>
> >
> >     do these work?

They are not used anywhere in plasma. But my guess would be they don't.


- Martin


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


On Jan. 22, 2015, 4:54 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122200/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2015, 4:54 p.m.)
> 
> 
> Review request for Plasma and Kai Uwe Broulik.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> It is currently not possible to use Q_INVOKABLE that takes Q_ENUM/Q_FLAGS as a parameter that is defined in a different class. This is mentioned in the docs and there's also a bug report here - https://bugreports.qt.io/browse/QTBUG-20639
> 
> If the default parameter is removed from the formatDuration, Plasma will complain with "Error: Unknown method parameter type KFormat::DurationFormatOptions".
> 
> Until that one is fixed, we can either take an integer and cast it to the flags or redeclare the enum from KFormats locally, but that's just not good.
> 
> 
> Diffs
> -----
> 
>   src/qmlcontrols/kcoreaddons/formats.h 59537bf 
>   src/qmlcontrols/kcoreaddons/formats.cpp 256778f 
> 
> Diff: https://git.reviewboard.kde.org/r/122200/diff/
> 
> 
> Testing
> -------
> 
> KFormat now properly formats the remaining time based on the passed flags.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150122/6ea9c025/attachment.html>


More information about the Plasma-devel mailing list