summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-04 12:34:12 -0600
committerAndrew <forkk@forkk.net>2013-12-04 12:34:12 -0600
commitbf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f (patch)
treec5da1162598f91853555c580bdba6b778dfc1ac0 /gui/MainWindow.cpp
parent6aa9bd0f77dcb5128167fae62e32aa5252fe85c6 (diff)
downloadMultiMC-bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f.tar
MultiMC-bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f.tar.gz
MultiMC-bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f.tar.lz
MultiMC-bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f.tar.xz
MultiMC-bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f.zip
Rework the update checking system
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index a6796a29..39c78360 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -84,7 +84,8 @@
#include "logic/SkinUtils.h"
#include "logic/LegacyInstance.h"
-#include <logic/GoUpdate.h>
+
+#include <logic/updater/UpdateChecker.h>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
@@ -239,8 +240,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
}
// set up the updater object.
- auto updater = MMC->goupdate();
- connect(updater.get(), SIGNAL(updateAvailable()), SLOT(updateAvailable()));
+ auto updater = MMC->updateChecker();
+ QObject::connect(updater.get(), &UpdateChecker::updateAvailable, this, &MainWindow::updateAvailable);
// if automatic update checks are allowed, start one.
if(MMC->settings()->get("AutoUpdate").toBool())
on_actionCheckUpdate_triggered();
@@ -426,7 +427,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
return QMainWindow::eventFilter(obj, ev);
}
-void MainWindow::updateAvailable()
+void MainWindow::updateAvailable(QString repo, QString versionName, int versionId)
{
UpdateDialog dlg;
UpdateAction action = (UpdateAction) dlg.exec();
@@ -631,7 +632,7 @@ void MainWindow::on_actionConfig_Folder_triggered()
void MainWindow::on_actionCheckUpdate_triggered()
{
- auto updater = MMC->goupdate();
+ auto updater = MMC->updateChecker();
updater->checkForUpdate();
}