D11012: Add Trash (empty, isEmpty, emptinessChanged)

Mark Gaiser noreply at phabricator.kde.org
Mon Mar 5 08:45:49 GMT 2018


markg added inline comments.

INLINE COMMENTS

> dolphintrash.cpp:64-67
> +    // This is bug in KIO. KDirLister::completed should fire up when KDirLister::itemsDeleted is fired.
> +    // This connect is workaround. If you find a way how to fix KIO, DO IT and remove this connect.
> +    connect(m_trashDirLister, static_cast<void(KDirLister::*)(const KFileItemList&)>(&KDirLister::itemsDeleted),
> +            trashDirContentChanged);

I know i said this before, but i now think that i'm wrong in that assumption.
The completed signal is a response to a request (give me a list of all the entries for example). When that request is completed, it emits the completed signal. That is how you know that there is nothing more to come.

The itemsDeleted (and itemsAdded) signal is a response to a change in a folder where you created the KDirLister job on and havent destroyed it yet. To be honest, i didn't know (till a dayago) that KDirLister was internally watching a dir for changes till you kill the object. It's basically a KDirWarch within KDirLister hidden away in a few signals. Kinda neat really :)

So it's not a bug. It just smelled like it :)
I think it's safe to remove the comment (or explain what's really going on) and keep this logic.

REPOSITORY
  R318 Dolphin

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

To: rominf, #dolphin, elvisangelaccio, #kde_applications
Cc: markg, rkflx, elvisangelaccio, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180305/04e714c1/attachment.htm>


More information about the kfm-devel mailing list