Bug 359088 - With "Show a count of items in Tree Views" Trash always shows count of 0 [patch]
Summary: With "Show a count of items in Tree Views" Trash always shows count of 0 [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Trash (show other bugs)
Version: 5.0.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-07 04:49 UTC by Michal Sylwester
Modified: 2017-08-14 08:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments
trashItemsCount.patch (1.48 KB, patch)
2016-02-07 18:54 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Sylwester 2016-02-07 04:49:13 UTC
With "Show a count of items in Tree Views" Trash shows count of 0 instead of numer of items in trash. 

Reproducible: Always

Steps to Reproduce:
1. "Show a count of items in Tree Views"
2. Compare the numer of items shown in tree view with actual trash contents


Actual Results:  
Tree view always shows 0

Expected Results:  
Numer of items in trash
Comment 1 caulier.gilles 2016-02-07 08:58:02 UTC
Right i confirm the bug about the trash tree-view...

Mohamed, if you can take a look please...

Gilles Caulier
Comment 2 Maik Qualmann 2016-02-07 18:54:43 UTC
Created attachment 97072 [details]
trashItemsCount.patch

A first idea for a solution. The Trash album is virtual. The number of items can not be retrieved from the DB. Maybe has Mohamed a better idea.

Maik
Comment 3 caulier.gilles 2016-02-07 21:08:28 UTC
Tested : patch is fine for me. It's better than nothing.

Mohamed ?

Gilles
Comment 4 Mohamed 2016-02-07 23:08:37 UTC
I was intending to add a text file inside ".dtrash" folder containing the number of deleted files and some other info, and It will be much faster,

But this patch will be good for the moment, I recommend applying it.

Sorry for late response, I am still working on some projects related to college.
Comment 5 Maik Qualmann 2016-02-08 18:59:53 UTC
Git commit e69fd26625e9ad29abca4dd68d7f0d044965ae6a by Maik Qualmann.
Committed on 08/02/2016 at 18:58.
Pushed by mqualmann into branch 'master'.

workaround for Trash items count always shows 0
FIXED-IN: 5.0.0

M  +2    -1    NEWS
M  +20   -3    libs/models/abstractalbummodel.cpp

http://commits.kde.org/digikam/e69fd26625e9ad29abca4dd68d7f0d044965ae6a