mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-24 02:28:33 +02:00
UpdateDialog: fix updater connect
This commit is contained in:
@@ -26,6 +26,10 @@ UpdateDialog::UpdateDialog(QWidget *parent, QSharedPointer<Updater> updater)
|
||||
ui->label_header->setFont(bigFont);
|
||||
ui->frame->hide();
|
||||
|
||||
connect(m_updater.data(), &Updater::updateAvailable, this, &UpdateDialog::updateAvailable);
|
||||
connect(m_updater.data(), &Updater::noUpdateAvailable, this, &UpdateDialog::noUpdateAvailable);
|
||||
connect(m_updater.data(), &Updater::updateCheckFailed, this, &UpdateDialog::onUpdateCheckFailed);
|
||||
|
||||
bool updateAvailable = (m_updater->state == Updater::State::UPDATE_AVAILABLE);
|
||||
if (updateAvailable) {
|
||||
this->updateAvailable();
|
||||
@@ -43,10 +47,6 @@ UpdateDialog::UpdateDialog(QWidget *parent, QSharedPointer<Updater> updater)
|
||||
connect(ui->btn_installUpdate, &QPushButton::clicked, this, &UpdateDialog::onInstallUpdate);
|
||||
connect(ui->btn_restart, &QPushButton::clicked, this, &UpdateDialog::onRestartClicked);
|
||||
|
||||
connect(m_updater.data(), &Updater::updateAvailable, this, &UpdateDialog::updateAvailable);
|
||||
connect(m_updater.data(), &Updater::noUpdateAvailable, this, &UpdateDialog::noUpdateAvailable);
|
||||
connect(m_updater.data(), &Updater::updateCheckFailed, this, &UpdateDialog::onUpdateCheckFailed);
|
||||
|
||||
this->adjustSize();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ void Updater::checkForUpdates() {
|
||||
UtilsNetworking network{this};
|
||||
QNetworkReply *reply = network.getJson(QString("%1/updates.json").arg(this->getWebsiteUrl()));
|
||||
if (!reply) {
|
||||
emit updateCheckFailed("Can't check for websites: offline mode enabled");
|
||||
emit updateCheckFailed("offline mode enabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user