> On July 11, 2012, 12:36 p.m., David Faure wrote:
> > KMimeTypeTrader::query honours the sorting, so InitialPreference=10 should 
> > have been enough in your thumbnailer.
> > 
> > preferredService() basically calls first() ;)
> > 
> > Patch is OK however.

IIRC I tried InitialPreference=10 but to no effect (but then we all fail 
sometimes).

But I did not inspect preferredService(), just looked at the name it seems :)
So the sorting by preference is already done when creating the cache I learn by 
your comment?

For KDELIBS NG I wonder if a thumbnail control should be added to the File 
Association settings, so the user can control which plugin stamps the 
thumbnail, if any. At least Calligra 2.6 will signal support for quite a lot of 
file types (due to the filter system there can be many), so overlapping of 
thumbnailers might happen more often.


- Friedrich W. H.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105371/#review15667
-----------------------------------------------------------


On June 28, 2012, 5:39 a.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105371/
> -----------------------------------------------------------
> 
> (Updated June 28, 2012, 5:39 a.m.)
> 
> 
> Review request for KDE Runtime.
> 
> 
> Description
> -------
> 
> The declared-as-supported mimetypes of the image thumbnailer are quite broad, 
> assuming a lot of QImageIOPlugin existing and installed. But at least for 
> x-fig and wmf there are no such plugins known, by what I can tell. So the 
> claim of support is wrong.
> 
> Worse: There is no safe way to install an own, better thumbnailer, that one 
> would be only chosen by pure luck. Reason is that the thumbnail creation 
> invoking code just greps the first in the list of found thumbnail plugins, 
> see the code in kde-runtime/kioslave/thumbnail/thumbnail.cpp:
> 
> QString ThumbnailProtocol::pluginForMimeType(const QString& mimeType) {
>     KService::List offers = KMimeTypeTrader::self()->query( mimeType, 
> QLatin1String("ThumbCreator"));
>     if (!offers.isEmpty()) {
>         KService::Ptr serv;
>         serv = offers.first();
>         return serv->library();
>     }
> [...]
> 
> E.g. trying to install an own xfig thumbnailer failed for me.
> 
> While changing the above code to use KMimeTypeTrader::preferredService(...) 
> surely might be also good to do, I have no idea about the impact.
> For now I just would like to have those two wrong claims removed.
> 
> Okay to backport to 4.9 (and 4.8)?
> 
> 
> Diffs
> -----
> 
>   kioslave/thumbnail/imagethumbnail.desktop 53c9a33 
> 
> Diff: http://git.reviewboard.kde.org/r/105371/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

Reply via email to