fix: remove updater if it is not used
This commit is contained in:
@ -1010,6 +1010,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
|
||||
}
|
||||
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
if(BuildConfig.UPDATER_ENABLED)
|
||||
{
|
||||
bool updatesAllowed = APPLICATION->updatesAreAllowed();
|
||||
@ -1028,6 +1029,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
|
||||
updater->checkForUpdate(APPLICATION->settings()->get("UpdateChannel").toString(), false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
setSelectedInstanceById(APPLICATION->settings()->get("SelectedInstance").toString());
|
||||
|
||||
@ -1337,6 +1339,7 @@ void MainWindow::repopulateAccountsMenu()
|
||||
ui->profileMenu->addAction(ui->actionManageAccounts);
|
||||
}
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
void MainWindow::updatesAllowedChanged(bool allowed)
|
||||
{
|
||||
if(!BuildConfig.UPDATER_ENABLED)
|
||||
@ -1345,6 +1348,7 @@ void MainWindow::updatesAllowedChanged(bool allowed)
|
||||
}
|
||||
ui->actionCheckUpdate->setEnabled(allowed);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Assumes the sender is a QAction
|
||||
@ -1450,6 +1454,7 @@ void MainWindow::updateNewsLabel()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
void MainWindow::updateAvailable(GoUpdate::Status status)
|
||||
{
|
||||
if(!APPLICATION->updatesAreAllowed())
|
||||
@ -1475,6 +1480,7 @@ void MainWindow::updateNotAvailable()
|
||||
UpdateDialog dlg(false, this);
|
||||
dlg.exec();
|
||||
}
|
||||
#endif
|
||||
|
||||
QList<int> stringToIntList(const QString &string)
|
||||
{
|
||||
@ -1496,6 +1502,7 @@ QString intListToString(const QList<int> &list)
|
||||
return slist.join(',');
|
||||
}
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
void MainWindow::downloadUpdates(GoUpdate::Status status)
|
||||
{
|
||||
if(!APPLICATION->updatesAreAllowed())
|
||||
@ -1529,6 +1536,7 @@ void MainWindow::downloadUpdates(GoUpdate::Status status)
|
||||
CustomMessageBox::selectable(this, tr("Error"), updateTask.failReason(), QMessageBox::Warning)->show();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::onCatToggled(bool state)
|
||||
{
|
||||
@ -1841,6 +1849,7 @@ void MainWindow::on_actionConfig_Folder_triggered()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
void MainWindow::checkForUpdates()
|
||||
{
|
||||
if(BuildConfig.UPDATER_ENABLED)
|
||||
@ -1853,6 +1862,7 @@ void MainWindow::checkForUpdates()
|
||||
qWarning() << "Updater not set up. Cannot check for updates.";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::on_actionSettings_triggered()
|
||||
{
|
||||
|
Reference in New Issue
Block a user