Review Request 129720: [ExtractorCollection] Use mimetype inheritance to return plugins

Anthony Fieroni bvbfan at abv.bg
Mon Jan 2 10:12:01 UTC 2017



> On Ян. 2, 2017, 11:42 преди обяд, David Faure wrote:
> > src/extractorcollection.cpp, line 155
> > <https://git.reviewboard.kde.org/r/129720/diff/1/?file=488223#file488223line155>
> >
> >     Shouldn't this be the other way around?
> >     
> >     You're looking for an extractor for type == application/vnd.oasis.opendocument.text.
> >     You find an extractor for it.key() == application/zip.
> >     That's not good, it won't know anything about OpenDocument stuff.
> >     
> >     So you want db.mimeTypeForName(it.value()).inherits(mimetype), no?
> >     
> >     KIO::PreviewJob iterates over type.allAncestors() instead, but now that I think about it, that seems overkill and doesn't do more than the suggested line above.

That was desired effect, i.e. we try to find more *abstract* parser. Does we can find any parser to db.mimeTypeForName(it.key()).inherits("application/vnd.oasis.opendocument.text") ? I don't think we can find someone or i'm in wrong :)


- Anthony


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


On Дек. 29, 2016, 9:17 преди обяд, Anthony Fieroni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129720/
> -----------------------------------------------------------
> 
> (Updated Дек. 29, 2016, 9:17 преди обяд)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kfilemetadata
> 
> 
> Description
> -------
> 
> startsWith is a weak precondition + guard for duplicate plugin
> 
> 
> Diffs
> -----
> 
>   src/extractorcollection.cpp d0fbbea 
> 
> Diff: https://git.reviewboard.kde.org/r/129720/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Anthony Fieroni
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170102/ed947c2e/attachment.html>


More information about the Kde-frameworks-devel mailing list