[QML] Set the remaining time in the monitor more reliably
Summary:
The remaining time was only updated when the count of indexed files
modulo 100 is 0. I.e. if already 1295 files are indexed, and 90 of these
files are changed the indexed count goes down to 1205 and the update
is never triggered.
Use a QElapsedTimer to update the time when the file count changes, but
at most once per second.
Test Plan:
Before:
Check the "Total files indexed" from balooctl status
Touch some large files (so the indexed count does not cross xx00)
The "remaining time" in kinfocenter is not updated
After:
The remaining time is updated after ~1 second.
Reviewers: Baloo, ngraham
Reviewed By: Baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D28260