D17245: Add string formatting function to property info

Stefan Brüns noreply at phabricator.kde.org
Sun Dec 2 21:32:11 GMT 2018


bruns added inline comments.

INLINE COMMENTS

> propertyinfotest.cpp:63
> +    PropertyInfo sampleRate(Property::SampleRate);
> +    QCOMPARE(sampleRate.formatAsDisplayString(QVariant(44100)), QStringLiteral("44,1 kHz"));
> +    PropertyInfo bitRate(Property::BitRate);

I think this should be "44.1 kHz". Insert the correct expected value and make it QEXPECT_FAIL?

> propertyinfotest.cpp:65
> +    PropertyInfo bitRate(Property::BitRate);
> +    QCOMPARE(bitRate.formatAsDisplayString(QVariant(128000)), QStringLiteral("128 kB/s"));
> +    PropertyInfo orientation(Property::ImageOrientation);

dito, "128 kb/s"

> formatstrings.cpp:80
> +    case 2: string = i18nc("Description of image orientation", "Horizontally flipped"); break;
> +    case 3: string = i18nc("Description of image orientation", "180° rotated CCW"); break;
> +    case 4: string = i18nc("Description of image orientation", "Vertically flipped"); break;

for 180°,  CCW is irrelevant.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, broulik, bruns, mgallien
Cc: ngraham, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181202/7c02ad13/attachment.html>


More information about the Kde-frameworks-devel mailing list