D20363: CollectionScheduler: port to qint64 to avoid the year-2038 bug

Daniel Vrátil noreply at phabricator.kde.org
Fri Apr 12 09:21:32 BST 2019


dvratil requested changes to this revision.
dvratil added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> collectionschedulertest.cpp:52
>          for (qint64 collectionId : {1, 2, 3, 5, 6, 7}) {
> -            QVERIFY(sched.nextScheduledTime(collectionId) > now + 4 * 60);
> -            QVERIFY(sched.nextScheduledTime(collectionId) < now + 6 * 60);
> +            QVERIFY(sched.nextScheduledTime(collectionId) > now + std::chrono::minutes(4));
> +            QVERIFY(sched.nextScheduledTime(collectionId) < now + std::chrono::minutes(6));

Add `using namespace std::chrono_literals` to the top, then you can use `4m` instead of having to spell out the whole type (also elsewhere in the code).

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

To: dfaure, dvratil
Cc: pino, kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190412/5f0c36a0/attachment.html>


More information about the kde-pim mailing list