summaryrefslogtreecommitdiffstats
path: root/gui
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
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')
-rw-r--r--gui/MainWindow.cpp11
-rw-r--r--gui/MainWindow.h2
2 files changed, 7 insertions, 6 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();
}
diff --git a/gui/MainWindow.h b/gui/MainWindow.h
index e3713f89..1f498eca 100644
--- a/gui/MainWindow.h
+++ b/gui/MainWindow.h
@@ -161,7 +161,7 @@ slots:
void startTask(Task *task);
- void updateAvailable();
+ void updateAvailable(QString repo, QString versionName, int versionId);
void activeAccountChanged();