summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-05 13:52:55 -0600
committerAndrew <forkk@forkk.net>2013-12-05 13:52:55 -0600
commit48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7 (patch)
treeeedc5fecd50dc395bbc686a5e798d626ebc62a82 /gui/MainWindow.cpp
parentbf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f (diff)
downloadMultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar
MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.gz
MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.lz
MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.tar.xz
MultiMC-48ec8e67b8cff63cd2d0e08c17e7bb576b4e07a7.zip
Implement DownloadUpdateTask
Installing updates is not implemented yet. That's next.
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 39c78360..618884ef 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -74,6 +74,8 @@
#include "logic/auth/flows/RefreshTask.h"
#include "logic/auth/flows/ValidateTask.h"
+#include "logic/updater/DownloadUpdateTask.h"
+
#include "logic/BaseInstance.h"
#include "logic/InstanceFactory.h"
#include "logic/MinecraftProcess.h"
@@ -434,13 +436,19 @@ void MainWindow::updateAvailable(QString repo, QString versionName, int versionI
switch(action)
{
case UPDATE_LATER:
- QLOG_INFO() << "Don't install update yet!";
+ QLOG_INFO() << "Update will be installed later.";
break;
case UPDATE_NOW:
- QLOG_INFO() << "Install update NOW!";
+ {
+ QLOG_INFO() << "Installing update.";
+ ProgressDialog updateDlg(this);
+ DownloadUpdateTask updateTask(repo, versionId, &updateDlg);
+ updateDlg.exec(&updateTask);
+ }
break;
case UPDATE_ONEXIT:
- QLOG_INFO() << "Install update on exit!";
+ // TODO: Implement installing updates on exit.
+ QLOG_INFO() << "Installing on exit is not implemented yet.";
break;
}
}