From 4d9e58ac42701b03dc9238d4a180becd8a649ab4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 14 Sep 2020 18:25:51 +1000 Subject: [PATCH] Qt: Allow updating to previously skipped builds by forcing update --- src/duckstation-qt/mainwindow.cpp | 9 ++++++++- src/duckstation-qt/mainwindow.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 739888974..eaee65150 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -669,7 +669,7 @@ void MainWindow::connectSignals() connect(m_ui.actionIssueTracker, &QAction::triggered, this, &MainWindow::onIssueTrackerActionTriggered); connect(m_ui.actionDiscordServer, &QAction::triggered, this, &MainWindow::onDiscordServerActionTriggered); connect(m_ui.actionAbout, &QAction::triggered, this, &MainWindow::onAboutActionTriggered); - connect(m_ui.actionCheckForUpdates, &QAction::triggered, [this]() { checkForUpdates(true); }); + connect(m_ui.actionCheckForUpdates, &QAction::triggered, this, &MainWindow::onCheckForUpdatesActionTriggered); connect(m_host_interface, &QtHostInterface::errorReported, this, &MainWindow::reportError, Qt::BlockingQueuedConnection); @@ -949,6 +949,13 @@ void MainWindow::updateDebugMenuVisibility() m_ui.menuDebug->menuAction()->setVisible(visible); } +void MainWindow::onCheckForUpdatesActionTriggered() +{ + // Wipe out the last version, that way it displays the update if we've previously skipped it. + m_host_interface->RemoveSettingValue("AutoUpdater", "LastVersion"); + checkForUpdates(true); +} + void MainWindow::checkForUpdates(bool display_message) { if (!AutoUpdaterDialog::isSupported()) diff --git a/src/duckstation-qt/mainwindow.h b/src/duckstation-qt/mainwindow.h index 809ef22f2..e00ad67c9 100644 --- a/src/duckstation-qt/mainwindow.h +++ b/src/duckstation-qt/mainwindow.h @@ -71,6 +71,7 @@ private Q_SLOTS: void onIssueTrackerActionTriggered(); void onDiscordServerActionTriggered(); void onAboutActionTriggered(); + void onCheckForUpdatesActionTriggered(); void onGameListEntrySelected(const GameListEntry* entry); void onGameListEntryDoubleClicked(const GameListEntry* entry);