From c45768a09ffcc6393912b74ed3661b5a110041e8 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 15 Feb 2015 20:25:18 +0200 Subject: add and use a version.c / version.h pair version.c is now object code which is recompiled each time ssrf-version.h changes, while the interface file version.h remains that same at all times and files which include it will not need to be recompiled. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/updatemanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qt-ui/updatemanager.cpp') diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp index 3fff8b45d..fbaa6ba3c 100644 --- a/qt-ui/updatemanager.cpp +++ b/qt-ui/updatemanager.cpp @@ -4,7 +4,7 @@ #include #include #include "subsurfacewebservices.h" -#include "ssrf-version.h" +#include "version.h" #include "mainwindow.h" UpdateManager::UpdateManager(QObject *parent) : QObject(parent) @@ -16,9 +16,9 @@ UpdateManager::UpdateManager(QObject *parent) : QObject(parent) return; if (settings.contains("LastVersionUsed")) { // we have checked at least once before - if (settings.value("LastVersionUsed").toString() != GIT_VERSION_STRING) { + if (settings.value("LastVersionUsed").toString() != subsurface_git_version()) { // we have just updated - wait two weeks before you check again - settings.setValue("LastVersionUsed", QString(GIT_VERSION_STRING)); + settings.setValue("LastVersionUsed", QString(subsurface_git_version())); settings.setValue("NextCheck", QDateTime::currentDateTime().addDays(14).toString(Qt::ISODate)); } else { // is it time to check again? @@ -28,7 +28,7 @@ UpdateManager::UpdateManager(QObject *parent) : QObject(parent) return; } } - settings.setValue("LastVersionUsed", QString(GIT_VERSION_STRING)); + settings.setValue("LastVersionUsed", QString(subsurface_git_version())); settings.setValue("NextCheck", QDateTime::currentDateTime().addDays(14).toString(Qt::ISODate)); checkForUpdates(true); } @@ -47,7 +47,7 @@ void UpdateManager::checkForUpdates(bool automatic) os = "unknown"; #endif isAutomaticCheck = automatic; - QString version = CANONICAL_VERSION_STRING; + QString version = subsurface_canonical_version(); QString uuidString = getUUID(); QString url = QString("http://subsurface-divelog.org/updatecheck.html?os=%1&version=%2&uuid=%3").arg(os, version, uuidString); QNetworkRequest request; -- cgit v1.2.3-70-g09d2