[KFileItemModelRolesUpdater] Avoid duplicate indexes to resolve
AbandonedPublic

Authored by broulik on Sep 10 2018, 12:17 PM.

Details

Summary

This avoids requesting a thumbnail twice for certain files, typically the first or last one in a folder

Test Plan

Noticed that it would generate the thumbnail for the first folder twice

Haven't spotted any more duplicates, there could be more cases

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Sep 10 2018, 12:17 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 10 2018, 12:17 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Sep 10 2018, 12:17 PM
hein accepted this revision.Sep 10 2018, 2:27 PM
This revision is now accepted and ready to land.Sep 10 2018, 2:27 PM
This revision was automatically updated to reflect the committed changes.
broulik reopened this revision.Sep 11 2018, 9:55 AM

I just reverted it, when I open Dolphin directly into a folder with few files, it doesn't load the first thumbnail anymore now :/

This revision is now accepted and ready to land.Sep 11 2018, 9:55 AM
anthonyfieroni added inline comments.
src/kitemviews/kfileitemmodelrolesupdater.cpp
1141

Make it this set and return toList ?

broulik added inline comments.Sep 12 2018, 9:31 AM
src/kitemviews/kfileitemmodelrolesupdater.cpp
1141

I thought about the same but the order in which the previews are generated does matter

@broulik Can you please "plan changes" or abandon it then?

broulik abandoned this revision.Oct 10 2018, 1:56 PM

Needs some more thorough investigation