Qt: Allow updating to previously skipped builds by forcing update

This commit is contained in:
Connor McLaughlin 2020-09-14 18:25:51 +10:00
parent daa5e02853
commit 4d9e58ac42
2 changed files with 9 additions and 1 deletions

View File

@ -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())

View File

@ -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);