23 #include "cfgautoupdates.h"
24 #include "ui_cfgautoupdates.h"
26 #include "configuration/doomseekerconfig.h"
28 #include "updater/updatechannel.h"
31 DClass<CFGAutoUpdates> :
public Ui::CFGAutoUpdates
42 #ifndef WITH_AUTOUPDATES
43 d->programUpdateArea->hide();
45 layout()->setAlignment(Qt::AlignTop);
48 CFGAutoUpdates::~CFGAutoUpdates()
52 void CFGAutoUpdates::initUpdateChannels()
57 d->cboUpdateChannel->addItem(channel.translatedName(),
62 void CFGAutoUpdates::onUpdateChannelChange(
int index)
65 QString
name = d->cboUpdateChannel->itemData(index).toString();
67 d->pteChannelDescription->setPlainText(channel.translatedDescription());
74 switch (gConfig.autoUpdates.updateMode)
77 d->rbDisabled->setChecked(
true);
81 d->rbNotifyButDontInstall->setChecked(
true);
84 d->rbInstallAutomatically->setChecked(
true);
87 QString channelName = gConfig.autoUpdates.updateChannelName;
88 int channelIdx = d->cboUpdateChannel->findData(channelName);
94 d->cboUpdateChannel->setCurrentIndex(channelIdx);
99 if (d->rbDisabled->isChecked())
101 else if (d->rbNotifyButDontInstall->isChecked())
103 else if (d->rbInstallAutomatically->isChecked())
106 assert(
false &&
"CFGAutoUpdates::saveSettings() - No radio button is checked.");
107 gConfig.autoUpdates.updateChannelName = d->cboUpdateChannel->itemData(
108 d->cboUpdateChannel->currentIndex()).toString();