fix: remove updater if it is not used
This commit is contained in:
@ -78,6 +78,7 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch
|
||||
m_languageModel = APPLICATION->translations();
|
||||
loadSettings();
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
if(BuildConfig.UPDATER_ENABLED)
|
||||
{
|
||||
QObject::connect(APPLICATION->updateChecker().get(), &UpdateChecker::channelListLoaded, this, &LauncherPage::refreshUpdateChannelList);
|
||||
@ -90,11 +91,9 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch
|
||||
{
|
||||
APPLICATION->updateChecker()->updateChanList(false);
|
||||
}
|
||||
ui->updateSettingsBox->setHidden(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->updateSettingsBox->setHidden(true);
|
||||
}
|
||||
#endif
|
||||
connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview()));
|
||||
connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview()));
|
||||
}
|
||||
@ -189,6 +188,7 @@ void LauncherPage::on_metadataDisableBtn_clicked()
|
||||
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
||||
}
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
void LauncherPage::refreshUpdateChannelList()
|
||||
{
|
||||
// Stop listening for selection changes. It's going to change a lot while we update it and
|
||||
@ -260,6 +260,7 @@ void LauncherPage::refreshUpdateChannelDesc()
|
||||
m_currentUpdateChannel = selected.id;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void LauncherPage::applySettings()
|
||||
{
|
||||
|
@ -90,6 +90,7 @@ slots:
|
||||
void on_iconsDirBrowseBtn_clicked();
|
||||
void on_metadataDisableBtn_clicked();
|
||||
|
||||
#ifdef LAUNCHER_WITH_UPDATER
|
||||
/*!
|
||||
* Updates the list of update channels in the combo box.
|
||||
*/
|
||||
@ -100,13 +101,13 @@ slots:
|
||||
*/
|
||||
void refreshUpdateChannelDesc();
|
||||
|
||||
void updateChannelSelectionChanged(int index);
|
||||
#endif
|
||||
/*!
|
||||
* Updates the font preview
|
||||
*/
|
||||
void refreshFontPreview();
|
||||
|
||||
void updateChannelSelectionChanged(int index);
|
||||
|
||||
private:
|
||||
Ui::LauncherPage *ui;
|
||||
|
||||
|
@ -50,6 +50,9 @@
|
||||
<property name="title">
|
||||
<string>Update Settings</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoUpdateCheckBox">
|
||||
|
Reference in New Issue
Block a user