From 6b1c125218475720e1bf7c920ed3d10140b0b7c2 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 16 Apr 2016 23:22:52 +1000 Subject: [PATCH] Forgot to set the UpdatesLastChecked timestamp --- sleepyhead/UpdaterWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sleepyhead/UpdaterWindow.cpp b/sleepyhead/UpdaterWindow.cpp index 106b7648..90217bc7 100644 --- a/sleepyhead/UpdaterWindow.cpp +++ b/sleepyhead/UpdaterWindow.cpp @@ -186,6 +186,8 @@ void UpdaterWindow::updateFinished(QNetworkReply *reply) #else ParseLatestVersion(&file); #endif + PREF[STR_GEN_UpdatesLastChecked] = QDateTime::currentDateTime(); + file.close(); reply->deleteLater(); } @@ -445,6 +447,7 @@ void UpdaterWindow::ParseLatestVersion(QIODevice *file) QString version=text.readAll().trimmed(); qDebug() << "Latest version is" << version; int i=compareVersion(version); + if (i>0) { mainwin->Notify(tr("Version %1 of SleepyHead is available, opening link to download site.").arg(version), STR_TR_SleepyHead); QDesktopServices::openUrl(QUrl(QString("http://sleepyhead.jedimark.net")));