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

David Faure faure at kde.org
Mon Jan 2 09:42:57 UTC 2017


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




src/extractorcollection.cpp (line 155)
<https://git.reviewboard.kde.org/r/129720/#comment68108>

    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.


- David Faure


On Dec. 29, 2016, 7:17 a.m., Anthony Fieroni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129720/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2016, 7:17 a.m.)
> 
> 
> 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/0f85e52e/attachment.html>


More information about the Kde-frameworks-devel mailing list