D29397: KPreviewJob : Support for DeviceRatioPixel

David Faure noreply at phabricator.kde.org
Mon May 4 08:39:12 BST 2020


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> previewjob.cpp:717
> +        qreal imgDevicePixelRatio;
> +        str >> width >> height >> iFormat >> imgDevicePixelRatio;
>          QImage::Format format = static_cast<QImage::Format>(iFormat);

This here also breaks compatibility. Add a KF6 TODO to start the serialization with a version number.

Meanwhile a hack is needed, like `if (iFormat & 0x1000) { iFormat &= 0xFFF; str >> imgDevicePixelRatio; }`
and of course setting that 0x1000 flag in the slaves that have been updated to provide the pixelratio.

> thumbcreator.h:183
>  class KIOWIDGETS_DEPRECATED_VERSION(5, 0, "Use ThumbCreator")
>  KIOWIDGETS_EXPORT ThumbCreatorV2 : public ThumbCreator
>  {

You need to do like we once did: define an interface that inherits from ThumbCreator.
Call it V3....

In the job, use dynamic_cast to test whether the object provided by the kioslave supports the V3 interface or not.

REPOSITORY
  R241 KIO

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

To: meven, dfaure, broulik, #frameworks
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200504/984fcaf3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list