mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 18:17:08 -07:00
more clean up for feature selecting a random port when starts up
This commit is contained in:
parent
75e28bb3e6
commit
2de8b9112d
4 changed files with 21 additions and 27 deletions
|
@ -138,7 +138,7 @@ options_imp::options_imp(QWidget *parent):
|
|||
// General tab
|
||||
connect(comboI18n, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
|
||||
connect(checkAltRowColors, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
//add checkbox for random port
|
||||
// add checkbox for random port
|
||||
connect(checkRandomPort, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkShowSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
|
@ -369,7 +369,7 @@ void options_imp::saveOptions() {
|
|||
// General preferences
|
||||
pref.setLocale(locale);
|
||||
pref.setAlternatingRowColors(checkAltRowColors->isChecked());
|
||||
//set random port
|
||||
// set random port
|
||||
pref.setRandomPort(checkRandomPort->isChecked());
|
||||
pref.setSystrayIntegration(systrayIntegration());
|
||||
pref.setTrayIconStyle(TrayIcon::Style(comboTrayIcon->currentIndex()));
|
||||
|
@ -544,7 +544,7 @@ void options_imp::loadOptions() {
|
|||
const Preferences pref;
|
||||
setLocale(pref.getLocale());
|
||||
checkAltRowColors->setChecked(pref.useAlternatingRowColors());
|
||||
//get random port
|
||||
// get random port
|
||||
checkRandomPort->setChecked(pref.useRandomPort());
|
||||
checkShowSystray->setChecked(pref.systrayIntegration());
|
||||
checkShowSplash->setChecked(!pref.isSlashScreenDisabled());
|
||||
|
@ -798,7 +798,6 @@ void options_imp::on_randomButton_clicked() {
|
|||
spinPort->setValue(rand() % 64512 + 1024);
|
||||
}
|
||||
|
||||
|
||||
int options_imp::getEncryptionSetting() const {
|
||||
return comboEncryption->currentIndex();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue