summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-06-07 23:42:22 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-09 00:03:42 +0200
commit166813cb918ebd029325e12377989bfdc2021074 (patch)
tree19a1a5a7e3503ccb85c9ac46bcb45e1bef19361e /application/MainWindow.cpp
parent38e42ad79493afb759181fa5cead90c9b3483655 (diff)
downloadMultiMC-166813cb918ebd029325e12377989bfdc2021074.tar
MultiMC-166813cb918ebd029325e12377989bfdc2021074.tar.gz
MultiMC-166813cb918ebd029325e12377989bfdc2021074.tar.lz
MultiMC-166813cb918ebd029325e12377989bfdc2021074.tar.xz
MultiMC-166813cb918ebd029325e12377989bfdc2021074.zip
GH-1060 remove some old updater bits and pieces
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 99c94bf8..933c4dbc 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -933,9 +933,6 @@ void MainWindow::updateAvailable(GoUpdate::Status status)
case UPDATE_NOW:
downloadUpdates(status);
break;
- case UPDATE_ONEXIT:
- downloadUpdates(status, true);
- break;
}
}
@@ -985,13 +982,9 @@ void MainWindow::notificationsChanged()
MMC->settings()->set("ShownNotifications", intListToString(shownNotifications));
}
-void MainWindow::downloadUpdates(GoUpdate::Status status, bool installOnExit)
+void MainWindow::downloadUpdates(GoUpdate::Status status)
{
qDebug() << "Downloading updates.";
- // TODO: If the user chooses to update on exit, we should download updates in the
- // background.
- // Doing so is a bit complicated, because we'd have to make sure it finished downloading
- // before actually exiting MultiMC.
ProgressDialog updateDlg(this);
status.rootPath = MMC->rootPath;
@@ -999,13 +992,7 @@ void MainWindow::downloadUpdates(GoUpdate::Status status, bool installOnExit)
// If the task succeeds, install the updates.
if (updateDlg.exec(&updateTask))
{
- UpdateFlags baseFlags = None;
- if (BuildConfig.UPDATER_DRY_RUN)
- baseFlags |= DryRun;
- if (installOnExit)
- MMC->installUpdates(updateTask.updateFilesDir(), baseFlags | OnExit);
- else
- MMC->installUpdates(updateTask.updateFilesDir(), baseFlags | RestartOnFinish);
+ MMC->installUpdates(updateTask.updateFilesDir());
}
else
{