mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
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:
parent
5f55dab0cc
commit
b878e8169e
@ -142,7 +142,7 @@ void BookmarksList::deleteOldest(int num)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(num)
|
Q_UNUSED(num)
|
||||||
QString comic;
|
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++) {
|
for (QMap<QString, Bookmark>::const_iterator itr = list.constBegin(); itr != list.constEnd(); itr++) {
|
||||||
if (itr->added < date) {
|
if (itr->added < date) {
|
||||||
comic = itr.key();
|
comic = itr.key();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user