applets/trash: Remove DirModel

Original commit message(s)

  • applets/trash: Remove DirModel

All it does is provide the number of items in trash. We can do that with less overhead by using KCoreDirLister directly.

While at it, skip updating the count while it's listing and instead show "Counting…" while it does.

Reason for the change

Found this while looking for occurrences of KIO::PreviewJob::gotPreview.

Test plan

plasmawindowed org.kde.plasma.trash, on startup it showed “Counting…” until the number was known. The number of items matched what the old version and Dolphin said. Adding and removing items to trash has the count updated accordingly. Emptying trash still works.

Screenshots or screen recordings

Bildschirmfoto_20260824_133738

Merge request reports

Loading