D21533: Format photo exposure time and bias as rational

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sun Jun 2 10:41:34 BST 2019


bruns added inline comments.

INLINE COMMENTS

> propertyinfotest.cpp:134
> +        { Property::PhotoExposureTime,      true,  0.0015625,               QStringLiteral("1/640")},
> +        { Property::PhotoExposureBiasValue, true,  0.3333333,               QStringLiteral("1/3")},
>          { Property::ReplayGainAlbumGain,    true,  -9.90,                   QStringLiteral("-9.9")},

Please add two more testcases for exposure bias:

1. negative bias
2. abs(bias) > 1

> formatstrings.cpp:161
>  
> +QString FormatStrings::formatAsDoubleOrRationale(const QVariant& value)
> +{

Rational, without 'e'

> formatstrings.cpp:167
> +    } else {
> +        auto reciprocal = round(1.0 / val);
> +        return i18nc("Rational number smaller than 1", "1/%1", reciprocal);

This will give a wrong result (1/2) for 0.4 seconds.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D21533

To: astippich, bruns, ngraham
Cc: kde-frameworks-devel, #baloo, gennad, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190602/0c6bfbc3/attachment.html>


More information about the Kde-frameworks-devel mailing list