Updater for websockets (#3581)

* Dont clobber password when pulling down server list.
* Force download server list on client update.
This commit is contained in:
Rob Blanckaert 2019-02-19 00:24:35 -08:00 committed by GitHub
parent 1b3da22dd7
commit d519f992d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 25 deletions

View file

@ -864,6 +864,7 @@ void MainWindow::alertForcedOracleRun(const QString &newVersion)
"Oracle will now launch to update your card database.")
.arg(newVersion));
actCheckCardUpdates();
actCheckServerUpdates();
}
MainWindow::~MainWindow()
@ -1127,6 +1128,13 @@ void MainWindow::cardUpdateFinished(int, QProcess::ExitStatus)
QtConcurrent::run(db, &CardDatabase::loadCardDatabases);
}
void MainWindow::actCheckServerUpdates()
{
auto hps = new HandlePublicServers(this);
hps->downloadPublicServers();
connect(hps, &HandlePublicServers::sigPublicServersDownloadedSuccessfully, [=]() { hps->deleteLater(); });
}
void MainWindow::refreshShortcuts()
{
aConnect->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aConnect"));