Replace QDateTime constructor

Using the last moment of the day is enough because all other dates in bookmarks have happened before.
This commit is contained in:
Luis Ángel San Martín 2021-10-01 19:46:54 +02:00
parent 5f55dab0cc
commit b878e8169e

View File

@ -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<QString, Bookmark>::const_iterator itr = list.constBegin(); itr != list.constEnd(); itr++) {
if (itr->added < date) {
comic = itr.key();