D28337: Fix unmounting during preview generation

Aleksei Nikiforov noreply at phabricator.kde.org
Fri Mar 27 12:24:02 GMT 2020


alnikiforov created this revision.
alnikiforov added reviewers: elvisangelaccio, ngraham.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
alnikiforov requested review of this revision.

REVISION SUMMARY
  Request all preview jobs for specific mount point to stop
  and proceed with unmount request only when all such jobs reported stopping.
  
  This change fixes unmounting when it is initiated from dolphin.
  Unfortunately, if unmounting is initiated outside of dolphin,
  for example from 'mounted devices' widget,
  Solid only sends broadcast notification and doesn't wait for any reply,
  thus unmounting may fail due to preview jobs not stopping in time.
  But in such case repeated unmount request from user should succeed immediately.

TEST PLAN
  1. Enable thumbnails and 'Places' panel in Dolphin
  2. Prepare removable device with directory with media files. Make sure that thumbnail generation takes some time. At least 15 seconds should be enough
  3. Remove thumbnails cache. I'm just doing 'rm -rf ~/.cache/thumbnails/*'
  4. Mount removable device and open directory with media files on removable device
  5. While thumbnail generation is in process, i.e. files gradually obtain preview thumbnails, request unmounting of removable device from 'Places' panel in Dolphin
  
  Without this change unmounting will fail unless thumbnails generation job finished running.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D28337

AFFECTED FILES
  src/dolphinmainwindow.cpp
  src/dolphinmainwindow.h
  src/dolphintabpage.cpp
  src/dolphintabpage.h
  src/dolphintabwidget.cpp
  src/dolphintabwidget.h
  src/kitemviews/kfileitemlistview.cpp
  src/kitemviews/kfileitemlistview.h
  src/kitemviews/kfileitemmodelrolesupdater.cpp
  src/kitemviews/kfileitemmodelrolesupdater.h
  src/views/dolphinview.cpp
  src/views/dolphinview.h

To: alnikiforov, elvisangelaccio, ngraham
Cc: kfm-devel, nikolaik, pberestov, iasensio, fprice, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200327/77643d81/attachment.htm>


More information about the kfm-devel mailing list