From b878e8169e9d3bc96d275bbd6b397c910ac94ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 1 Oct 2021 19:46:54 +0200 Subject: [PATCH] Replace QDateTime constructor Using the last moment of the day is enough because all other dates in bookmarks have happened before. --- common/bookmarks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bookmarks.cpp b/common/bookmarks.cpp index 21b27c8e..4db72435 100644 --- a/common/bookmarks.cpp +++ b/common/bookmarks.cpp @@ -142,7 +142,7 @@ void BookmarksList::deleteOldest(int num) { Q_UNUSED(num) QString comic; - QDateTime date(QDate(10000, 1, 1)); // TODO MAX_DATE?? + auto date = QDate().endOfDay(); for (QMap::const_iterator itr = list.constBegin(); itr != list.constEnd(); itr++) { if (itr->added < date) { comic = itr.key();