[Folder thumbnailer] Use custom folder icon if set
ClosedPublic

Authored by broulik on Jan 20 2017, 11:33 AM.

Details

Summary

BUG: 375333

Test Plan

I find the following code very suspicious

QString localFile = directory.path();

Also, when you use a non-folder icon the thumbnail overlays will look bad but at least you can have colored folders now. Dunno about remote locations (does it even create folder thumbnails there?).

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 10384.Jan 20 2017, 11:33 AM
broulik retitled this revision from to [Folder thumbnailer] Use custom folder icon if set.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: dfaure.
broulik set the repository for this revision to R320 KIO Extras.
broulik updated this object.
dfaure accepted this revision.Jan 20 2017, 9:31 PM
dfaure edited edge metadata.

For files, KIO::PreviewJob takes care of downloading files and then calls kio_thumbnail with a thumbnail:/ URL that contains the local file path.
For directories I guess only local dirs are supported, anything else would be slow and wouldn't fit this design anyway.

thumbnail/thumbnail.cpp
467

I think this is correct [except maybe on Windows] because "directory" is a URL with the thumbnail:/ scheme, and here we extract the local file path from that URL.

This revision is now accepted and ready to land.Jan 20 2017, 9:31 PM
This revision was automatically updated to reflect the committed changes.