From ede6a38bcf38bbff56a8e41cb38f69c1532d0697 Mon Sep 17 00:00:00 2001 From: Joshua Joseph Date: Wed, 2 Apr 2014 22:41:39 +0300 Subject: Add "Check for updates" Feature This patch adds a check for updates feature. It connects to http://subsurface.hohndel.org/updatecheck.html to check for any new versions. It then prompts the user with a download link if an update is available. Signed-off-by: Joseph W. Joshua Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index b63225295..ead32835c 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -37,6 +37,7 @@ #include "diveplanner.h" #include "about.h" #include "worldmap-save.h" +#include "updatemanager.h" #ifndef NO_PRINTING #include "printdialog.h" #endif @@ -84,6 +85,8 @@ MainWindow::MainWindow() : QMainWindow(), ui.divePlanner->settingsChanged(); ui.divePlannerWidget->settingsChanged(); + updateManager = new UpdateManager(this); + #ifndef ENABLE_PLANNER // ui.menuLog->removeAction(ui.actionDivePlanner); #endif @@ -575,6 +578,11 @@ void MainWindow::on_actionAboutSubsurface_triggered() dlg.exec(); } +void MainWindow::on_action_Check_for_Updates_triggered() +{ + updateManager->checkForUpdates(); +} + void MainWindow::on_actionUserManual_triggered() { #ifndef NO_USERMANUAL -- cgit v1.2.3-70-g09d2