diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-06-07 23:42:22 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-06-09 00:03:42 +0200 |
commit | 166813cb918ebd029325e12377989bfdc2021074 (patch) | |
tree | 19a1a5a7e3503ccb85c9ac46bcb45e1bef19361e /application/MainWindow.cpp | |
parent | 38e42ad79493afb759181fa5cead90c9b3483655 (diff) | |
download | MultiMC-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.cpp | 17 |
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 { |