From 8edd0100e852cda9f44abd12cc06931542a2004a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 25 Dec 2013 02:46:06 +0100 Subject: Fix more updater derps. * Updater requires unix style paths on input. * No update notification was getting cloned with every check --- gui/MainWindow.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gui') 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); } -- cgit v1.2.3