D20362: Add test for CollectionScheduler, code cleanups, bugfixes.
David Faure
noreply at phabricator.kde.org
Sun Apr 7 18:01:29 BST 2019
dfaure created this revision.
dfaure added a reviewer: dvratil.
Herald added a project: KDE PIM.
dfaure requested review of this revision.
REVISION SUMMARY
Wrote a unittest just for fun. Found lots of interesting things...
- Methods called in the wrong thread, leading to QTimer warnings
- Unscheduling all collections with the same "next time" when one collection is removed
- for() loops with if+return, where find_if() is much more readable
- Unnecessary detaching (non-const lowerBound)
- All this will break in 2038 (32 bit time in seconds), will fix in next commit
TEST PLAN
bin/collectionschedulertest
REPOSITORY
R165 Akonadi
BRANCH
2019_collectionscheduler_tests
REVISION DETAIL
https://phabricator.kde.org/D20362
AFFECTED FILES
autotests/server/CMakeLists.txt
autotests/server/collectionschedulertest.cpp
autotests/server/fakecollectionscheduler.cpp
autotests/server/fakecollectionscheduler.h
src/server/collectionscheduler.cpp
src/server/collectionscheduler.h
To: dfaure, dvratil
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190407/b68f72a3/attachment.html>
More information about the kde-pim
mailing list