Review Request 119958: Fix thumbnails for mimetype groups.

David Faure faure at kde.org
Fri Sep 5 22:39:31 UTC 2014


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


I wouldn't recommend implementing support for groups in KService because, well, the desktop entry spec doesn't support it
(so people would start writing app desktop files which don't work in other desktop environments)

This bug is a result of me porting from serviceTypes to mimeTypes (621a455bf30721402e6fba00e3fddb35c9a2a5a8). I didn't think about wildcards.
Interestingly this shows the old code didn't filter out ThumbCreator - but I agree that it should.

So I'd recommend:
* going back to serviceTypes
* filtering out ThumbCreator (by name, not by position)
* adding a comment like  // not using mimeTypes() because that would filter out text/*

This should be done in both places touched by the above mentionned commit, i.e. supportedMimeTypes too, not just startPreview.


src/widgets/previewjob.cpp
<https://git.reviewboard.kde.org/r/119958/#comment46019>

    That seems like a very dangerous thing to rely upon. Ordering isn't guaranteed.
    Better skip ThumbCreator explicitely.


- David Faure


On Sept. 4, 2014, 3:43 p.m., Maarten De Meyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119958/
> -----------------------------------------------------------
> 
> (Updated Sept. 4, 2014, 3:43 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Fix a regression in PreviewJob. This one was hard to find :)
> 
> KService::mimeTypes cannot handle mimetype groups. ex: text/*
> Use KService::serviceTypes instead and ignore the first item which is
> always type 'ThumbCreator'
> 
> This is the quick and easy solution. I could also add support for mimetype groups to KService::mimeTypes. (so that it return all mimetypes in a group) Not sure what the best solution is. Are groups only used in thumbnailer files?
> 
> 
> Diffs
> -----
> 
>   src/widgets/previewjob.cpp 55a3fb7 
> 
> Diff: https://git.reviewboard.kde.org/r/119958/diff/
> 
> 
> Testing
> -------
> 
> I'm porting a thumbnailer to frameworks 5. Before nothing happend, now I see thumbnails.
> 
> 
> Thanks,
> 
> Maarten De Meyer
> 
>

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


More information about the Kde-frameworks-devel mailing list