summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Joshua Joseph <joejoshw@gmail.com>2014-04-02 22:41:39 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-02 12:47:41 -0700
commitede6a38bcf38bbff56a8e41cb38f69c1532d0697 (patch)
tree975aa14d60bb491cd3880b2d239d335682557127 /qt-ui/mainwindow.cpp
parent5cec965cb7bea3abbb12823404b6a7cfcfb57225 (diff)
downloadsubsurface-ede6a38bcf38bbff56a8e41cb38f69c1532d0697.tar.gz
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 <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
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