Forgot to set the UpdatesLastChecked timestamp

This commit is contained in:
Mark Watkins 2016-04-16 23:22:52 +10:00
parent 973f409587
commit 6b1c125218

View File

@ -186,6 +186,8 @@ void UpdaterWindow::updateFinished(QNetworkReply *reply)
#else #else
ParseLatestVersion(&file); ParseLatestVersion(&file);
#endif #endif
PREF[STR_GEN_UpdatesLastChecked] = QDateTime::currentDateTime();
file.close(); file.close();
reply->deleteLater(); reply->deleteLater();
} }
@ -445,6 +447,7 @@ void UpdaterWindow::ParseLatestVersion(QIODevice *file)
QString version=text.readAll().trimmed(); QString version=text.readAll().trimmed();
qDebug() << "Latest version is" << version; qDebug() << "Latest version is" << version;
int i=compareVersion(version); int i=compareVersion(version);
if (i>0) { if (i>0) {
mainwin->Notify(tr("Version %1 of SleepyHead is available, opening link to download site.").arg(version), STR_TR_SleepyHead); 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"))); QDesktopServices::openUrl(QUrl(QString("http://sleepyhead.jedimark.net")));