Show changelog even when there are no new updates available.

This commit is contained in:
Petr Mrázek
2014-07-14 00:57:54 +02:00
parent d8d6f5929b
commit 3821569363
9 changed files with 34 additions and 20 deletions

View File

@ -305,12 +305,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
auto updater = MMC->updateChecker();
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();
});
connect(updater.get(), &UpdateChecker::noUpdateFound, this,
&MainWindow::updateNotAvailable);
// if automatic update checks are allowed, start one.
if (MMC->settings()->get("AutoUpdate").toBool())
on_actionCheckUpdate_triggered();
@ -621,6 +617,12 @@ void MainWindow::updateAvailable(QString repo, QString versionName, int versionI
}
}
void MainWindow::updateNotAvailable()
{
UpdateDialog dlg(false);
dlg.exec();
}
QList<int> stringToIntList(const QString &string)
{
QStringList split = string.split(',', QString::SkipEmptyParts);