provide a list of supported mimetypes for embeddedimagedata
ClosedPublic

Authored by astippich on Oct 14 2018, 2:07 PM.

Details

Summary

provide a list of supported mimetypes similar to
the extractor plugins and adjust test

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich created this revision.Oct 14 2018, 2:07 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptOct 14 2018, 2:07 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
astippich requested review of this revision.Oct 14 2018, 2:07 PM
astippich updated this revision to Diff 43601.Oct 14 2018, 5:16 PM
  • move mimetype list to private
mgallien added inline comments.Oct 14 2018, 7:14 PM
src/embeddedimagedata.h
62

You can make it static because you are returning a static member. It means that you should probably return by const reference (even if I do not remember if it is always the best answer).

astippich added inline comments.Oct 15 2018, 8:23 PM
src/embeddedimagedata.h
62

I had it this way before, but actually reverted it to make it consistent with the plugins, and this would also allow to potentially change the implementation later, wouldn't it? Anyway, your call.

bruns requested changes to this revision.Oct 16 2018, 11:39 PM
bruns added inline comments.
autotests/embeddedimagedatatest.cpp
48

QVERIFY(condition)

src/embeddedimagedata.cpp
73

supportedMimeTypes() ?
capital T, see ImageType and QMimeType

This revision now requires changes to proceed.Oct 16 2018, 11:39 PM
astippich updated this revision to Diff 43819.Oct 17 2018, 7:04 PM
  • use QVERIFY
  • use capital T
  • add since 5.52 tag and rephrase documentation
astippich marked an inline comment as done.Oct 17 2018, 7:06 PM
astippich added inline comments.
src/embeddedimagedata.cpp
73

The "read" is supposed to mark that only read operations for these mimetypes are supported. I plan to add support for writing add some points, and the supported formats may differ.
Or maybe one could use extractionMimeTypes() ?

astippich updated this revision to Diff 43888.Oct 18 2018, 6:06 PM
astippich marked an inline comment as done.
  • remove read prefix

I've decided to name it similar to the extractor plugins

bruns accepted this revision.Oct 28 2018, 3:53 PM
This revision is now accepted and ready to land.Oct 28 2018, 3:53 PM
This revision was automatically updated to reflect the committed changes.