mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Move "Check for program updates" checkbox out of Advanced settings
This commit is contained in:
parent
4a9fc48dee
commit
eb784b0d2e
@ -70,9 +70,6 @@ enum AdvSettingsRows
|
|||||||
SAVE_RESUME_DATA_INTERVAL,
|
SAVE_RESUME_DATA_INTERVAL,
|
||||||
CONFIRM_RECHECK_TORRENT,
|
CONFIRM_RECHECK_TORRENT,
|
||||||
RECHECK_COMPLETED,
|
RECHECK_COMPLETED,
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
|
||||||
UPDATE_CHECK,
|
|
||||||
#endif
|
|
||||||
// UI related
|
// UI related
|
||||||
LIST_REFRESH,
|
LIST_REFRESH,
|
||||||
RESOLVE_HOSTS,
|
RESOLVE_HOSTS,
|
||||||
@ -235,9 +232,6 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||||||
// Seed choking algorithm
|
// Seed choking algorithm
|
||||||
session->setSeedChokingAlgorithm(static_cast<BitTorrent::SeedChokingAlgorithm>(m_comboBoxSeedChokingAlgorithm.currentIndex()));
|
session->setSeedChokingAlgorithm(static_cast<BitTorrent::SeedChokingAlgorithm>(m_comboBoxSeedChokingAlgorithm.currentIndex()));
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
|
||||||
pref->setUpdateCheckEnabled(m_checkBoxUpdateCheck.isChecked());
|
|
||||||
#endif
|
|
||||||
// Icon theme
|
// Icon theme
|
||||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||||
pref->useSystemIconTheme(m_checkBoxUseIconTheme.isChecked());
|
pref->useSystemIconTheme(m_checkBoxUseIconTheme.isChecked());
|
||||||
@ -521,10 +515,6 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
addRow(SEED_CHOKING_ALGORITHM, (tr("Upload choking algorithm") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm", "(?)"))
|
addRow(SEED_CHOKING_ALGORITHM, (tr("Upload choking algorithm") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm", "(?)"))
|
||||||
, &m_comboBoxSeedChokingAlgorithm);
|
, &m_comboBoxSeedChokingAlgorithm);
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
|
||||||
m_checkBoxUpdateCheck.setChecked(pref->isUpdateCheckEnabled());
|
|
||||||
addRow(UPDATE_CHECK, tr("Check for software updates"), &m_checkBoxUpdateCheck);
|
|
||||||
#endif
|
|
||||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||||
m_checkBoxUseIconTheme.setChecked(pref->useSystemIconTheme());
|
m_checkBoxUseIconTheme.setChecked(pref->useSystemIconTheme());
|
||||||
addRow(USE_ICON_THEME, tr("Use system icon theme"), &m_checkBoxUseIconTheme);
|
addRow(USE_ICON_THEME, tr("Use system icon theme"), &m_checkBoxUseIconTheme);
|
||||||
|
@ -69,10 +69,6 @@ private:
|
|||||||
QLineEdit m_lineEditAnnounceIP;
|
QLineEdit m_lineEditAnnounceIP;
|
||||||
|
|
||||||
// OS dependent settings
|
// OS dependent settings
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
|
||||||
QCheckBox m_checkBoxUpdateCheck;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||||
QCheckBox m_checkBoxUseIconTheme;
|
QCheckBox m_checkBoxUseIconTheme;
|
||||||
#endif
|
#endif
|
||||||
|
@ -200,6 +200,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
|
|
||||||
#if !(defined(Q_OS_WIN) || defined(Q_OS_MAC))
|
#if !(defined(Q_OS_WIN) || defined(Q_OS_MAC))
|
||||||
m_ui->groupFileAssociation->setVisible(false);
|
m_ui->groupFileAssociation->setVisible(false);
|
||||||
|
m_ui->checkProgramUpdates->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_ui->textWebUIRootFolder->setMode(FileSystemPathEdit::Mode::DirectoryOpen);
|
m_ui->textWebUIRootFolder->setMode(FileSystemPathEdit::Mode::DirectoryOpen);
|
||||||
@ -215,7 +216,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
connect(m_ui->checkRandomPort, &QAbstractButton::toggled, m_ui->spinPort, &ThisType::setDisabled);
|
connect(m_ui->checkRandomPort, &QAbstractButton::toggled, m_ui->spinPort, &ThisType::setDisabled);
|
||||||
|
|
||||||
// Apply button is activated when a value is changed
|
// Apply button is activated when a value is changed
|
||||||
// General tab
|
// Behavior tab
|
||||||
connect(m_ui->comboI18n, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
connect(m_ui->comboI18n, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->comboTheme, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
connect(m_ui->comboTheme, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->confirmDeletion, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->confirmDeletion, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
@ -243,6 +244,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
connect(m_ui->checkAssociateTorrents, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->checkAssociateTorrents, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->checkAssociateMagnetLinks, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->checkAssociateMagnetLinks, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
|
connect(m_ui->checkProgramUpdates, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||||
#endif
|
#endif
|
||||||
connect(m_ui->checkFileLog, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
connect(m_ui->checkFileLog, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->textFileLogPath, &FileSystemPathEdit::selectedPathChanged, this, &ThisType::enableApplyButton);
|
connect(m_ui->textFileLogPath, &FileSystemPathEdit::selectedPathChanged, this, &ThisType::enableApplyButton);
|
||||||
@ -594,7 +596,7 @@ void OptionsDialog::saveOptions()
|
|||||||
qApp->installTranslator(translator);
|
qApp->installTranslator(translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
// General preferences
|
// Behavior preferences
|
||||||
pref->setLocale(locale);
|
pref->setLocale(locale);
|
||||||
|
|
||||||
if (!m_uiThemeFilePath.isEmpty()
|
if (!m_uiThemeFilePath.isEmpty()
|
||||||
@ -638,6 +640,9 @@ void OptionsDialog::saveOptions()
|
|||||||
m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
|
m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
|
||||||
m_ui->checkAssociateMagnetLinks->setEnabled(!m_ui->checkAssociateMagnetLinks->isChecked());
|
m_ui->checkAssociateMagnetLinks->setEnabled(!m_ui->checkAssociateMagnetLinks->isChecked());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
pref->setUpdateCheckEnabled(m_ui->checkProgramUpdates->isChecked());
|
||||||
#endif
|
#endif
|
||||||
auto *const app = static_cast<Application *>(QCoreApplication::instance());
|
auto *const app = static_cast<Application *>(QCoreApplication::instance());
|
||||||
app->setFileLoggerPath(m_ui->textFileLogPath->selectedPath());
|
app->setFileLoggerPath(m_ui->textFileLogPath->selectedPath());
|
||||||
@ -647,7 +652,7 @@ void OptionsDialog::saveOptions()
|
|||||||
app->setFileLoggerAgeType(m_ui->comboFileLogAgeType->currentIndex());
|
app->setFileLoggerAgeType(m_ui->comboFileLogAgeType->currentIndex());
|
||||||
app->setFileLoggerDeleteOld(m_ui->checkFileLogDelete->isChecked());
|
app->setFileLoggerDeleteOld(m_ui->checkFileLogDelete->isChecked());
|
||||||
app->setFileLoggerEnabled(m_ui->checkFileLog->isChecked());
|
app->setFileLoggerEnabled(m_ui->checkFileLog->isChecked());
|
||||||
// End General preferences
|
// End Behavior preferences
|
||||||
|
|
||||||
RSS::Session::instance()->setRefreshInterval(m_ui->spinRSSRefreshInterval->value());
|
RSS::Session::instance()->setRefreshInterval(m_ui->spinRSSRefreshInterval->value());
|
||||||
RSS::Session::instance()->setMaxArticlesPerFeed(m_ui->spinRSSMaxArticlesPerFeed->value());
|
RSS::Session::instance()->setMaxArticlesPerFeed(m_ui->spinRSSMaxArticlesPerFeed->value());
|
||||||
@ -833,7 +838,7 @@ void OptionsDialog::loadOptions()
|
|||||||
bool fileLogDelete = true;
|
bool fileLogDelete = true;
|
||||||
const Preferences *const pref = Preferences::instance();
|
const Preferences *const pref = Preferences::instance();
|
||||||
|
|
||||||
// General preferences
|
// Behavior preferences
|
||||||
setLocale(pref->getLocale());
|
setLocale(pref->getLocale());
|
||||||
m_ui->confirmDeletion->setChecked(pref->confirmTorrentDeletion());
|
m_ui->confirmDeletion->setChecked(pref->confirmTorrentDeletion());
|
||||||
m_ui->checkAltRowColors->setChecked(pref->useAlternatingRowColors());
|
m_ui->checkAltRowColors->setChecked(pref->useAlternatingRowColors());
|
||||||
@ -869,6 +874,9 @@ void OptionsDialog::loadOptions()
|
|||||||
m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
|
m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
|
||||||
m_ui->checkAssociateMagnetLinks->setEnabled(!m_ui->checkAssociateMagnetLinks->isChecked());
|
m_ui->checkAssociateMagnetLinks->setEnabled(!m_ui->checkAssociateMagnetLinks->isChecked());
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
m_ui->checkProgramUpdates->setChecked(pref->isUpdateCheckEnabled());
|
||||||
|
#endif
|
||||||
|
|
||||||
const Application *const app = static_cast<Application*>(QCoreApplication::instance());
|
const Application *const app = static_cast<Application*>(QCoreApplication::instance());
|
||||||
m_ui->checkFileLog->setChecked(app->isFileLoggerEnabled());
|
m_ui->checkFileLog->setChecked(app->isFileLoggerEnabled());
|
||||||
@ -883,7 +891,7 @@ void OptionsDialog::loadOptions()
|
|||||||
m_ui->spinFileLogSize->setValue(app->fileLoggerMaxSize() / 1024);
|
m_ui->spinFileLogSize->setValue(app->fileLoggerMaxSize() / 1024);
|
||||||
m_ui->spinFileLogAge->setValue(app->fileLoggerAge());
|
m_ui->spinFileLogAge->setValue(app->fileLoggerAge());
|
||||||
m_ui->comboFileLogAgeType->setCurrentIndex(app->fileLoggerAgeType());
|
m_ui->comboFileLogAgeType->setCurrentIndex(app->fileLoggerAgeType());
|
||||||
// End General preferences
|
// End Behavior preferences
|
||||||
|
|
||||||
m_ui->checkRSSEnable->setChecked(RSS::Session::instance()->isProcessingEnabled());
|
m_ui->checkRSSEnable->setChecked(RSS::Session::instance()->isProcessingEnabled());
|
||||||
m_ui->checkRSSAutoDownloaderEnable->setChecked(RSS::AutoDownloader::instance()->isProcessingEnabled());
|
m_ui->checkRSSAutoDownloaderEnable->setChecked(RSS::AutoDownloader::instance()->isProcessingEnabled());
|
||||||
|
@ -501,6 +501,13 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkProgramUpdates">
|
||||||
|
<property name="text">
|
||||||
|
<string>Check for program updates</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user