diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-25 02:46:06 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-25 02:46:06 +0100 |
commit | 8edd0100e852cda9f44abd12cc06931542a2004a (patch) | |
tree | 7ce0510e5190d9dd153552159806367a3e60eea6 /gui/MainWindow.cpp | |
parent | e3389a4eef5beaa8db49fcd82a8b725f234d3840 (diff) | |
download | MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.gz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.lz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.xz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.zip |
Fix more updater derps.
* Updater requires unix style paths on input.
* No update notification was getting cloned with every check
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 006f5b8e..bafccb1b 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -248,8 +248,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi // set up the updater object. auto updater = MMC->updateChecker(); - QObject::connect(updater.get(), &UpdateChecker::updateAvailable, this, - &MainWindow::updateAvailable); + connect(updater.get(), &UpdateChecker::updateAvailable, this, + &MainWindow::updateAvailable); + connect(updater.get(), &UpdateChecker::noUpdateFound, [this]() + { + CustomMessageBox::selectable( + this, tr("No update found."), + tr("No MultiMC update was found!\nYou are using the latest version."))->exec(); + }); // if automatic update checks are allowed, start one. if (MMC->settings()->get("AutoUpdate").toBool()) on_actionCheckUpdate_triggered(); @@ -681,9 +687,7 @@ void MainWindow::on_actionConfig_Folder_triggered() void MainWindow::on_actionCheckUpdate_triggered() { auto updater = MMC->updateChecker(); - connect(updater.get(), &UpdateChecker::noUpdateFound, [this](){ - CustomMessageBox::selectable(this, "No update found.", "No MultiMC update was found!\nYou are using the latest version.")->exec(); - }); + updater->checkForUpdate(true); } |