From 9cc4f65fc815fdf9968f1c344c7b9d15751dd7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 28 May 2018 21:18:11 +0200 Subject: [PATCH] Use older api currentSecsSinceEpoch was introduced in Qt 5.8 --- YACReader/main_window_viewer.cpp | 2 +- YACReaderLibrary/db_helper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 7a4f3c81..99bd4cc0 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -1682,7 +1682,7 @@ void MainWindowViewer::decreasePageZoomLevel() void MainWindowViewer::sendComic() { YACReaderLocalClient * client = new YACReaderLocalClient; - currentComicDB.info.lastTimeOpened = QDateTime::currentSecsSinceEpoch(); + currentComicDB.info.lastTimeOpened = QDateTime::currentMSecsSinceEpoch() / 1000; viewer->updateComic(currentComicDB); if (currentComicDB.info.currentPage == currentComicDB.info.numPages) { diff --git a/YACReaderLibrary/db_helper.cpp b/YACReaderLibrary/db_helper.cpp index e53f9b30..2155ea11 100644 --- a/YACReaderLibrary/db_helper.cpp +++ b/YACReaderLibrary/db_helper.cpp @@ -736,7 +736,7 @@ void DBHelper::updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatab updateComicInfo.bindValue(":read", comicInfo.read?1:0); updateComicInfo.bindValue(":currentPage", comicInfo.currentPage); updateComicInfo.bindValue(":hasBeenOpened", comicInfo.hasBeenOpened?1:0); - updateComicInfo.bindValue(":lastTimeOpened", QDateTime::currentSecsSinceEpoch()); + updateComicInfo.bindValue(":lastTimeOpened", QDateTime::currentMSecsSinceEpoch() / 1000); updateComicInfo.bindValue(":id", comicInfo.id); updateComicInfo.bindValue(":rating", comicInfo.rating); updateComicInfo.exec();