mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
UpdateDialog: fix updater connect
This commit is contained in:
parent
31183f7a31
commit
0881c287ba
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue