Rename class variables

This commit is contained in:
Chocobo1 2019-07-23 14:34:57 +08:00
parent ccec50e18e
commit 9d88dd2604
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 197 additions and 197 deletions

View file

@ -137,11 +137,11 @@ AdvancedSettings::AdvancedSettings(QWidget *parent)
setSelectionMode(QAbstractItemView::NoSelection); setSelectionMode(QAbstractItemView::NoSelection);
setEditTriggers(QAbstractItemView::NoEditTriggers); setEditTriggers(QAbstractItemView::NoEditTriggers);
// Signals // Signals
connect(&spinBoxCache, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged) connect(&m_spinBoxCache, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged)
, this, &AdvancedSettings::updateCacheSpinSuffix); , this, &AdvancedSettings::updateCacheSpinSuffix);
connect(&comboBoxInterface, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged) connect(&m_comboBoxInterface, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged)
, this, &AdvancedSettings::updateInterfaceAddressCombo); , this, &AdvancedSettings::updateInterfaceAddressCombo);
connect(&spinBoxSaveResumeDataInterval, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged) connect(&m_spinBoxSaveResumeDataInterval, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged)
, this, &AdvancedSettings::updateSaveResumeDataIntervalSuffix); , this, &AdvancedSettings::updateSaveResumeDataIntervalSuffix);
// Load settings // Load settings
loadAdvancedSettings(); loadAdvancedSettings();
@ -155,129 +155,129 @@ void AdvancedSettings::saveAdvancedSettings()
BitTorrent::Session *const session = BitTorrent::Session::instance(); BitTorrent::Session *const session = BitTorrent::Session::instance();
// Async IO threads // Async IO threads
session->setAsyncIOThreads(spinBoxAsyncIOThreads.value()); session->setAsyncIOThreads(m_spinBoxAsyncIOThreads.value());
// File pool size // File pool size
session->setFilePoolSize(spinBoxFilePoolSize.value()); session->setFilePoolSize(m_spinBoxFilePoolSize.value());
// Checking Memory Usage // Checking Memory Usage
session->setCheckingMemUsage(spinBoxCheckingMemUsage.value()); session->setCheckingMemUsage(m_spinBoxCheckingMemUsage.value());
// Disk write cache // Disk write cache
session->setDiskCacheSize(spinBoxCache.value()); session->setDiskCacheSize(m_spinBoxCache.value());
session->setDiskCacheTTL(spinBoxCacheTTL.value()); session->setDiskCacheTTL(m_spinBoxCacheTTL.value());
// Enable OS cache // Enable OS cache
session->setUseOSCache(checkBoxOsCache.isChecked()); session->setUseOSCache(m_checkBoxOsCache.isChecked());
// Coalesce reads & writes // Coalesce reads & writes
session->setCoalesceReadWriteEnabled(checkBoxCoalesceRW.isChecked()); session->setCoalesceReadWriteEnabled(m_checkBoxCoalesceRW.isChecked());
// Suggest mode // Suggest mode
session->setSuggestMode(checkBoxSuggestMode.isChecked()); session->setSuggestMode(m_checkBoxSuggestMode.isChecked());
// Send buffer watermark // Send buffer watermark
session->setSendBufferWatermark(spinBoxSendBufferWatermark.value()); session->setSendBufferWatermark(m_spinBoxSendBufferWatermark.value());
session->setSendBufferLowWatermark(spinBoxSendBufferLowWatermark.value()); session->setSendBufferLowWatermark(m_spinBoxSendBufferLowWatermark.value());
session->setSendBufferWatermarkFactor(spinBoxSendBufferWatermarkFactor.value()); session->setSendBufferWatermarkFactor(m_spinBoxSendBufferWatermarkFactor.value());
// Socket listen backlog size // Socket listen backlog size
session->setSocketBacklogSize(spinBoxSocketBacklogSize.value()); session->setSocketBacklogSize(m_spinBoxSocketBacklogSize.value());
// Save resume data interval // Save resume data interval
session->setSaveResumeDataInterval(spinBoxSaveResumeDataInterval.value()); session->setSaveResumeDataInterval(m_spinBoxSaveResumeDataInterval.value());
// Outgoing ports // Outgoing ports
session->setOutgoingPortsMin(spinBoxOutgoingPortsMin.value()); session->setOutgoingPortsMin(m_spinBoxOutgoingPortsMin.value());
session->setOutgoingPortsMax(spinBoxOutgoingPortsMax.value()); session->setOutgoingPortsMax(m_spinBoxOutgoingPortsMax.value());
// uTP-TCP mixed mode // uTP-TCP mixed mode
session->setUtpMixedMode(static_cast<BitTorrent::MixedModeAlgorithm>(comboBoxUtpMixedMode.currentIndex())); session->setUtpMixedMode(static_cast<BitTorrent::MixedModeAlgorithm>(m_comboBoxUtpMixedMode.currentIndex()));
// multiple connections per IP // multiple connections per IP
session->setMultiConnectionsPerIpEnabled(checkBoxMultiConnectionsPerIp.isChecked()); session->setMultiConnectionsPerIpEnabled(m_checkBoxMultiConnectionsPerIp.isChecked());
// Recheck torrents on completion // Recheck torrents on completion
pref->recheckTorrentsOnCompletion(checkBoxRecheckCompleted.isChecked()); pref->recheckTorrentsOnCompletion(m_checkBoxRecheckCompleted.isChecked());
// Transfer list refresh interval // Transfer list refresh interval
session->setRefreshInterval(spinBoxListRefresh.value()); session->setRefreshInterval(m_spinBoxListRefresh.value());
// Peer resolution // Peer resolution
pref->resolvePeerCountries(checkBoxResolveCountries.isChecked()); pref->resolvePeerCountries(m_checkBoxResolveCountries.isChecked());
pref->resolvePeerHostNames(checkBoxResolveHosts.isChecked()); pref->resolvePeerHostNames(m_checkBoxResolveHosts.isChecked());
// Super seeding // Super seeding
session->setSuperSeedingEnabled(checkBoxSuperSeeding.isChecked()); session->setSuperSeedingEnabled(m_checkBoxSuperSeeding.isChecked());
// Network interface // Network interface
if (comboBoxInterface.currentIndex() == 0) { if (m_comboBoxInterface.currentIndex() == 0) {
// All interfaces (default) // All interfaces (default)
session->setNetworkInterface(QString()); session->setNetworkInterface(QString());
session->setNetworkInterfaceName(QString()); session->setNetworkInterfaceName(QString());
} }
else { else {
session->setNetworkInterface(comboBoxInterface.itemData(comboBoxInterface.currentIndex()).toString()); session->setNetworkInterface(m_comboBoxInterface.itemData(m_comboBoxInterface.currentIndex()).toString());
session->setNetworkInterfaceName(comboBoxInterface.currentText()); session->setNetworkInterfaceName(m_comboBoxInterface.currentText());
} }
// Interface address // Interface address
if (comboBoxInterfaceAddress.currentIndex() == 0) { if (m_comboBoxInterfaceAddress.currentIndex() == 0) {
// All addresses (default) // All addresses (default)
session->setNetworkInterfaceAddress({}); session->setNetworkInterfaceAddress({});
} }
else { else {
QHostAddress ifaceAddr(comboBoxInterfaceAddress.currentText().trimmed()); QHostAddress ifaceAddr(m_comboBoxInterfaceAddress.currentText().trimmed());
ifaceAddr.isNull() ? session->setNetworkInterfaceAddress({}) : session->setNetworkInterfaceAddress(ifaceAddr.toString()); ifaceAddr.isNull() ? session->setNetworkInterfaceAddress({}) : session->setNetworkInterfaceAddress(ifaceAddr.toString());
} }
session->setIPv6Enabled(checkBoxListenIPv6.isChecked()); session->setIPv6Enabled(m_checkBoxListenIPv6.isChecked());
// Announce IP // Announce IP
QHostAddress addr(lineEditAnnounceIP.text().trimmed()); QHostAddress addr(m_lineEditAnnounceIP.text().trimmed());
session->setAnnounceIP(addr.isNull() ? "" : addr.toString()); session->setAnnounceIP(addr.isNull() ? "" : addr.toString());
// Program notification // Program notification
MainWindow *const mainWindow = static_cast<Application*>(QCoreApplication::instance())->mainWindow(); MainWindow *const mainWindow = static_cast<Application*>(QCoreApplication::instance())->mainWindow();
mainWindow->setNotificationsEnabled(checkBoxProgramNotifications.isChecked()); mainWindow->setNotificationsEnabled(m_checkBoxProgramNotifications.isChecked());
mainWindow->setTorrentAddedNotificationsEnabled(checkBoxTorrentAddedNotifications.isChecked()); mainWindow->setTorrentAddedNotificationsEnabled(m_checkBoxTorrentAddedNotifications.isChecked());
// Misc GUI properties // Misc GUI properties
mainWindow->setDownloadTrackerFavicon(checkBoxTrackerFavicon.isChecked()); mainWindow->setDownloadTrackerFavicon(m_checkBoxTrackerFavicon.isChecked());
AddNewTorrentDialog::setSavePathHistoryLength(spinBoxSavePathHistoryLength.value()); AddNewTorrentDialog::setSavePathHistoryLength(m_spinBoxSavePathHistoryLength.value());
pref->setSpeedWidgetEnabled(checkBoxSpeedWidgetEnabled.isChecked()); pref->setSpeedWidgetEnabled(m_checkBoxSpeedWidgetEnabled.isChecked());
// Tracker // Tracker
session->setTrackerEnabled(checkBoxTrackerStatus.isChecked()); session->setTrackerEnabled(m_checkBoxTrackerStatus.isChecked());
pref->setTrackerPort(spinBoxTrackerPort.value()); pref->setTrackerPort(m_spinBoxTrackerPort.value());
// Choking algorithm // Choking algorithm
session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(comboBoxChokingAlgorithm.currentIndex())); session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(m_comboBoxChokingAlgorithm.currentIndex()));
// Seed choking algorithm // Seed choking algorithm
session->setSeedChokingAlgorithm(static_cast<BitTorrent::SeedChokingAlgorithm>(comboBoxSeedChokingAlgorithm.currentIndex())); session->setSeedChokingAlgorithm(static_cast<BitTorrent::SeedChokingAlgorithm>(m_comboBoxSeedChokingAlgorithm.currentIndex()));
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
pref->setUpdateCheckEnabled(checkBoxUpdateCheck.isChecked()); pref->setUpdateCheckEnabled(m_checkBoxUpdateCheck.isChecked());
#endif #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(checkBoxUseIconTheme.isChecked()); pref->useSystemIconTheme(m_checkBoxUseIconTheme.isChecked());
#endif #endif
pref->setConfirmTorrentRecheck(checkBoxConfirmTorrentRecheck.isChecked()); pref->setConfirmTorrentRecheck(m_checkBoxConfirmTorrentRecheck.isChecked());
pref->setConfirmRemoveAllTags(checkBoxConfirmRemoveAllTags.isChecked()); pref->setConfirmRemoveAllTags(m_checkBoxConfirmRemoveAllTags.isChecked());
session->setAnnounceToAllTrackers(checkBoxAnnounceAllTrackers.isChecked()); session->setAnnounceToAllTrackers(m_checkBoxAnnounceAllTrackers.isChecked());
session->setAnnounceToAllTiers(checkBoxAnnounceAllTiers.isChecked()); session->setAnnounceToAllTiers(m_checkBoxAnnounceAllTiers.isChecked());
} }
void AdvancedSettings::updateCacheSpinSuffix(int value) void AdvancedSettings::updateCacheSpinSuffix(int value)
{ {
if (value == 0) if (value == 0)
spinBoxCache.setSuffix(tr(" (disabled)")); m_spinBoxCache.setSuffix(tr(" (disabled)"));
else if (value < 0) else if (value < 0)
spinBoxCache.setSuffix(tr(" (auto)")); m_spinBoxCache.setSuffix(tr(" (auto)"));
else else
spinBoxCache.setSuffix(tr(" MiB")); m_spinBoxCache.setSuffix(tr(" MiB"));
} }
void AdvancedSettings::updateSaveResumeDataIntervalSuffix(const int value) void AdvancedSettings::updateSaveResumeDataIntervalSuffix(const int value)
{ {
if (value > 0) if (value > 0)
spinBoxSaveResumeDataInterval.setSuffix(tr(" min", " minutes")); m_spinBoxSaveResumeDataInterval.setSuffix(tr(" min", " minutes"));
else else
spinBoxSaveResumeDataInterval.setSuffix(tr(" (disabled)")); m_spinBoxSaveResumeDataInterval.setSuffix(tr(" (disabled)"));
} }
void AdvancedSettings::updateInterfaceAddressCombo() void AdvancedSettings::updateInterfaceAddressCombo()
{ {
// Try to get the currently selected interface name // Try to get the currently selected interface name
const QString ifaceName = comboBoxInterface.itemData(comboBoxInterface.currentIndex()).toString(); // Empty string for the first element const QString ifaceName = m_comboBoxInterface.itemData(m_comboBoxInterface.currentIndex()).toString(); // Empty string for the first element
const QString currentAddress = BitTorrent::Session::instance()->networkInterfaceAddress(); const QString currentAddress = BitTorrent::Session::instance()->networkInterfaceAddress();
// Clear all items and reinsert them, default to all // Clear all items and reinsert them, default to all
comboBoxInterfaceAddress.clear(); m_comboBoxInterfaceAddress.clear();
comboBoxInterfaceAddress.addItem(tr("All addresses")); m_comboBoxInterfaceAddress.addItem(tr("All addresses"));
comboBoxInterfaceAddress.setCurrentIndex(0); m_comboBoxInterfaceAddress.setCurrentIndex(0);
auto populateCombo = [this, &currentAddress](const QString &ip, const QAbstractSocket::NetworkLayerProtocol &protocol) auto populateCombo = [this, &currentAddress](const QString &ip, const QAbstractSocket::NetworkLayerProtocol &protocol)
{ {
@ -285,10 +285,10 @@ void AdvancedSettings::updateInterfaceAddressCombo()
// Only take ipv4 for now? // Only take ipv4 for now?
if ((protocol != QAbstractSocket::IPv4Protocol) && (protocol != QAbstractSocket::IPv6Protocol)) if ((protocol != QAbstractSocket::IPv4Protocol) && (protocol != QAbstractSocket::IPv6Protocol))
return; return;
comboBoxInterfaceAddress.addItem(ip); m_comboBoxInterfaceAddress.addItem(ip);
//Try to select the last added one //Try to select the last added one
if (ip == currentAddress) if (ip == currentAddress)
comboBoxInterfaceAddress.setCurrentIndex(comboBoxInterfaceAddress.count() - 1); m_comboBoxInterfaceAddress.setCurrentIndex(m_comboBoxInterfaceAddress.count() - 1);
}; };
if (ifaceName.isEmpty()) { if (ifaceName.isEmpty()) {
@ -328,136 +328,136 @@ void AdvancedSettings::loadAdvancedSettings()
static_cast<QLabel *>(cellWidget(LIBTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); static_cast<QLabel *>(cellWidget(LIBTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
// Async IO threads // Async IO threads
spinBoxAsyncIOThreads.setMinimum(1); m_spinBoxAsyncIOThreads.setMinimum(1);
spinBoxAsyncIOThreads.setMaximum(1024); m_spinBoxAsyncIOThreads.setMaximum(1024);
spinBoxAsyncIOThreads.setValue(session->asyncIOThreads()); m_spinBoxAsyncIOThreads.setValue(session->asyncIOThreads());
addRow(ASYNC_IO_THREADS, (tr("Asynchronous I/O threads") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#aio_threads", "(?)")) addRow(ASYNC_IO_THREADS, (tr("Asynchronous I/O threads") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#aio_threads", "(?)"))
, &spinBoxAsyncIOThreads); , &m_spinBoxAsyncIOThreads);
// File pool size // File pool size
spinBoxFilePoolSize.setMinimum(1); m_spinBoxFilePoolSize.setMinimum(1);
spinBoxFilePoolSize.setMaximum(std::numeric_limits<int>::max()); m_spinBoxFilePoolSize.setMaximum(std::numeric_limits<int>::max());
spinBoxFilePoolSize.setValue(session->filePoolSize()); m_spinBoxFilePoolSize.setValue(session->filePoolSize());
addRow(FILE_POOL_SIZE, (tr("File pool size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#file_pool_size", "(?)")) addRow(FILE_POOL_SIZE, (tr("File pool size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#file_pool_size", "(?)"))
, &spinBoxFilePoolSize); , &m_spinBoxFilePoolSize);
// Checking Memory Usage // Checking Memory Usage
spinBoxCheckingMemUsage.setMinimum(1); m_spinBoxCheckingMemUsage.setMinimum(1);
// When build as 32bit binary, set the maximum value lower to prevent crashes. // When build as 32bit binary, set the maximum value lower to prevent crashes.
#ifdef QBT_APP_64BIT #ifdef QBT_APP_64BIT
spinBoxCheckingMemUsage.setMaximum(1024); m_spinBoxCheckingMemUsage.setMaximum(1024);
#else #else
// Allocate at most 128MiB out of the remaining 512MiB (see the cache part below) // Allocate at most 128MiB out of the remaining 512MiB (see the cache part below)
spinBoxCheckingMemUsage.setMaximum(128); m_spinBoxCheckingMemUsage.setMaximum(128);
#endif #endif
spinBoxCheckingMemUsage.setValue(session->checkingMemUsage()); m_spinBoxCheckingMemUsage.setValue(session->checkingMemUsage());
spinBoxCheckingMemUsage.setSuffix(tr(" MiB")); m_spinBoxCheckingMemUsage.setSuffix(tr(" MiB"));
addRow(CHECKING_MEM_USAGE, (tr("Outstanding memory when checking torrents") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#checking_mem_usage", "(?)")) addRow(CHECKING_MEM_USAGE, (tr("Outstanding memory when checking torrents") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#checking_mem_usage", "(?)"))
, &spinBoxCheckingMemUsage); , &m_spinBoxCheckingMemUsage);
// Disk write cache // Disk write cache
spinBoxCache.setMinimum(-1); m_spinBoxCache.setMinimum(-1);
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes. // When build as 32bit binary, set the maximum at less than 2GB to prevent crashes.
#ifdef QBT_APP_64BIT #ifdef QBT_APP_64BIT
spinBoxCache.setMaximum(33554431); // 32768GiB m_spinBoxCache.setMaximum(33554431); // 32768GiB
#else #else
// allocate 1536MiB and leave 512MiB to the rest of program data in RAM // allocate 1536MiB and leave 512MiB to the rest of program data in RAM
spinBoxCache.setMaximum(1536); m_spinBoxCache.setMaximum(1536);
#endif #endif
spinBoxCache.setValue(session->diskCacheSize()); m_spinBoxCache.setValue(session->diskCacheSize());
updateCacheSpinSuffix(spinBoxCache.value()); updateCacheSpinSuffix(m_spinBoxCache.value());
addRow(DISK_CACHE, (tr("Disk cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_size", "(?)")) addRow(DISK_CACHE, (tr("Disk cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_size", "(?)"))
, &spinBoxCache); , &m_spinBoxCache);
// Disk cache expiry // Disk cache expiry
spinBoxCacheTTL.setMinimum(1); m_spinBoxCacheTTL.setMinimum(1);
spinBoxCacheTTL.setMaximum(std::numeric_limits<int>::max()); m_spinBoxCacheTTL.setMaximum(std::numeric_limits<int>::max());
spinBoxCacheTTL.setValue(session->diskCacheTTL()); m_spinBoxCacheTTL.setValue(session->diskCacheTTL());
spinBoxCacheTTL.setSuffix(tr(" s", " seconds")); m_spinBoxCacheTTL.setSuffix(tr(" s", " seconds"));
addRow(DISK_CACHE_TTL, (tr("Disk cache expiry interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_expiry", "(?)")) addRow(DISK_CACHE_TTL, (tr("Disk cache expiry interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_expiry", "(?)"))
, &spinBoxCacheTTL); , &m_spinBoxCacheTTL);
// Enable OS cache // Enable OS cache
checkBoxOsCache.setChecked(session->useOSCache()); m_checkBoxOsCache.setChecked(session->useOSCache());
addRow(OS_CACHE, (tr("Enable OS cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode", "(?)")) addRow(OS_CACHE, (tr("Enable OS cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode", "(?)"))
, &checkBoxOsCache); , &m_checkBoxOsCache);
// Coalesce reads & writes // Coalesce reads & writes
checkBoxCoalesceRW.setChecked(session->isCoalesceReadWriteEnabled()); m_checkBoxCoalesceRW.setChecked(session->isCoalesceReadWriteEnabled());
addRow(COALESCE_RW, (tr("Coalesce reads & writes") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#coalesce_reads", "(?)")) addRow(COALESCE_RW, (tr("Coalesce reads & writes") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#coalesce_reads", "(?)"))
, &checkBoxCoalesceRW); , &m_checkBoxCoalesceRW);
// Suggest mode // Suggest mode
checkBoxSuggestMode.setChecked(session->isSuggestModeEnabled()); m_checkBoxSuggestMode.setChecked(session->isSuggestModeEnabled());
addRow(SUGGEST_MODE, (tr("Send upload piece suggestions") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#suggest_mode", "(?)")) addRow(SUGGEST_MODE, (tr("Send upload piece suggestions") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#suggest_mode", "(?)"))
, &checkBoxSuggestMode); , &m_checkBoxSuggestMode);
// Send buffer watermark // Send buffer watermark
spinBoxSendBufferWatermark.setMinimum(1); m_spinBoxSendBufferWatermark.setMinimum(1);
spinBoxSendBufferWatermark.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSendBufferWatermark.setMaximum(std::numeric_limits<int>::max());
spinBoxSendBufferWatermark.setSuffix(tr(" KiB")); m_spinBoxSendBufferWatermark.setSuffix(tr(" KiB"));
spinBoxSendBufferWatermark.setValue(session->sendBufferWatermark()); m_spinBoxSendBufferWatermark.setValue(session->sendBufferWatermark());
addRow(SEND_BUF_WATERMARK, (tr("Send buffer watermark") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark", "(?)")) addRow(SEND_BUF_WATERMARK, (tr("Send buffer watermark") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark", "(?)"))
, &spinBoxSendBufferWatermark); , &m_spinBoxSendBufferWatermark);
spinBoxSendBufferLowWatermark.setMinimum(1); m_spinBoxSendBufferLowWatermark.setMinimum(1);
spinBoxSendBufferLowWatermark.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSendBufferLowWatermark.setMaximum(std::numeric_limits<int>::max());
spinBoxSendBufferLowWatermark.setSuffix(tr(" KiB")); m_spinBoxSendBufferLowWatermark.setSuffix(tr(" KiB"));
spinBoxSendBufferLowWatermark.setValue(session->sendBufferLowWatermark()); m_spinBoxSendBufferLowWatermark.setValue(session->sendBufferLowWatermark());
addRow(SEND_BUF_LOW_WATERMARK, (tr("Send buffer low watermark") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark", "(?)")) addRow(SEND_BUF_LOW_WATERMARK, (tr("Send buffer low watermark") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark", "(?)"))
, &spinBoxSendBufferLowWatermark); , &m_spinBoxSendBufferLowWatermark);
spinBoxSendBufferWatermarkFactor.setMinimum(1); m_spinBoxSendBufferWatermarkFactor.setMinimum(1);
spinBoxSendBufferWatermarkFactor.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSendBufferWatermarkFactor.setMaximum(std::numeric_limits<int>::max());
spinBoxSendBufferWatermarkFactor.setSuffix(" %"); m_spinBoxSendBufferWatermarkFactor.setSuffix(" %");
spinBoxSendBufferWatermarkFactor.setValue(session->sendBufferWatermarkFactor()); m_spinBoxSendBufferWatermarkFactor.setValue(session->sendBufferWatermarkFactor());
addRow(SEND_BUF_WATERMARK_FACTOR, (tr("Send buffer watermark factor") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor", "(?)")) addRow(SEND_BUF_WATERMARK_FACTOR, (tr("Send buffer watermark factor") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor", "(?)"))
, &spinBoxSendBufferWatermarkFactor); , &m_spinBoxSendBufferWatermarkFactor);
// Socket listen backlog size // Socket listen backlog size
spinBoxSocketBacklogSize.setMinimum(1); m_spinBoxSocketBacklogSize.setMinimum(1);
spinBoxSocketBacklogSize.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSocketBacklogSize.setMaximum(std::numeric_limits<int>::max());
spinBoxSocketBacklogSize.setValue(session->socketBacklogSize()); m_spinBoxSocketBacklogSize.setValue(session->socketBacklogSize());
addRow(SOCKET_BACKLOG_SIZE, (tr("Socket backlog size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#listen_queue_size", "(?)")) addRow(SOCKET_BACKLOG_SIZE, (tr("Socket backlog size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#listen_queue_size", "(?)"))
, &spinBoxSocketBacklogSize); , &m_spinBoxSocketBacklogSize);
// Save resume data interval // Save resume data interval
spinBoxSaveResumeDataInterval.setMinimum(0); m_spinBoxSaveResumeDataInterval.setMinimum(0);
spinBoxSaveResumeDataInterval.setMaximum(std::numeric_limits<int>::max()); m_spinBoxSaveResumeDataInterval.setMaximum(std::numeric_limits<int>::max());
spinBoxSaveResumeDataInterval.setValue(session->saveResumeDataInterval()); m_spinBoxSaveResumeDataInterval.setValue(session->saveResumeDataInterval());
updateSaveResumeDataIntervalSuffix(spinBoxSaveResumeDataInterval.value()); updateSaveResumeDataIntervalSuffix(m_spinBoxSaveResumeDataInterval.value());
addRow(SAVE_RESUME_DATA_INTERVAL, tr("Save resume data interval", "How often the fastresume file is saved."), &spinBoxSaveResumeDataInterval); addRow(SAVE_RESUME_DATA_INTERVAL, tr("Save resume data interval", "How often the fastresume file is saved."), &m_spinBoxSaveResumeDataInterval);
// Outgoing port Min // Outgoing port Min
spinBoxOutgoingPortsMin.setMinimum(0); m_spinBoxOutgoingPortsMin.setMinimum(0);
spinBoxOutgoingPortsMin.setMaximum(65535); m_spinBoxOutgoingPortsMin.setMaximum(65535);
spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin()); m_spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin());
addRow(OUTGOING_PORT_MIN, tr("Outgoing ports (Min) [0: Disabled]"), &spinBoxOutgoingPortsMin); addRow(OUTGOING_PORT_MIN, tr("Outgoing ports (Min) [0: Disabled]"), &m_spinBoxOutgoingPortsMin);
// Outgoing port Min // Outgoing port Min
spinBoxOutgoingPortsMax.setMinimum(0); m_spinBoxOutgoingPortsMax.setMinimum(0);
spinBoxOutgoingPortsMax.setMaximum(65535); m_spinBoxOutgoingPortsMax.setMaximum(65535);
spinBoxOutgoingPortsMax.setValue(session->outgoingPortsMax()); m_spinBoxOutgoingPortsMax.setValue(session->outgoingPortsMax());
addRow(OUTGOING_PORT_MAX, tr("Outgoing ports (Max) [0: Disabled]"), &spinBoxOutgoingPortsMax); addRow(OUTGOING_PORT_MAX, tr("Outgoing ports (Max) [0: Disabled]"), &m_spinBoxOutgoingPortsMax);
// uTP-TCP mixed mode // uTP-TCP mixed mode
comboBoxUtpMixedMode.addItems({tr("Prefer TCP"), tr("Peer proportional (throttles TCP)")}); m_comboBoxUtpMixedMode.addItems({tr("Prefer TCP"), tr("Peer proportional (throttles TCP)")});
comboBoxUtpMixedMode.setCurrentIndex(static_cast<int>(session->utpMixedMode())); m_comboBoxUtpMixedMode.setCurrentIndex(static_cast<int>(session->utpMixedMode()));
addRow(UTP_MIX_MODE, (tr("%1-TCP mixed mode algorithm", "uTP-TCP mixed mode algorithm").arg(C_UTP) addRow(UTP_MIX_MODE, (tr("%1-TCP mixed mode algorithm", "uTP-TCP mixed mode algorithm").arg(C_UTP)
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm", "(?)")) + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm", "(?)"))
, &comboBoxUtpMixedMode); , &m_comboBoxUtpMixedMode);
// multiple connections per IP // multiple connections per IP
checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled()); m_checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled());
addRow(MULTI_CONNECTIONS_PER_IP, tr("Allow multiple connections from the same IP address"), &checkBoxMultiConnectionsPerIp); addRow(MULTI_CONNECTIONS_PER_IP, tr("Allow multiple connections from the same IP address"), &m_checkBoxMultiConnectionsPerIp);
// Recheck completed torrents // Recheck completed torrents
checkBoxRecheckCompleted.setChecked(pref->recheckTorrentsOnCompletion()); m_checkBoxRecheckCompleted.setChecked(pref->recheckTorrentsOnCompletion());
addRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &checkBoxRecheckCompleted); addRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &m_checkBoxRecheckCompleted);
// Transfer list refresh interval // Transfer list refresh interval
spinBoxListRefresh.setMinimum(30); m_spinBoxListRefresh.setMinimum(30);
spinBoxListRefresh.setMaximum(99999); m_spinBoxListRefresh.setMaximum(99999);
spinBoxListRefresh.setValue(session->refreshInterval()); m_spinBoxListRefresh.setValue(session->refreshInterval());
spinBoxListRefresh.setSuffix(tr(" ms", " milliseconds")); m_spinBoxListRefresh.setSuffix(tr(" ms", " milliseconds"));
addRow(LIST_REFRESH, tr("Transfer list refresh interval"), &spinBoxListRefresh); addRow(LIST_REFRESH, tr("Transfer list refresh interval"), &m_spinBoxListRefresh);
// Resolve Peer countries // Resolve Peer countries
checkBoxResolveCountries.setChecked(pref->resolvePeerCountries()); m_checkBoxResolveCountries.setChecked(pref->resolvePeerCountries());
addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries (GeoIP)"), &checkBoxResolveCountries); addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries (GeoIP)"), &m_checkBoxResolveCountries);
// Resolve peer hosts // Resolve peer hosts
checkBoxResolveHosts.setChecked(pref->resolvePeerHostNames()); m_checkBoxResolveHosts.setChecked(pref->resolvePeerHostNames());
addRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &checkBoxResolveHosts); addRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &m_checkBoxResolveHosts);
// Super seeding // Super seeding
checkBoxSuperSeeding.setChecked(session->isSuperSeedingEnabled()); m_checkBoxSuperSeeding.setChecked(session->isSuperSeedingEnabled());
addRow(SUPER_SEEDING, (tr("Strict super seeding") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#strict_super_seeding", "(?)")) addRow(SUPER_SEEDING, (tr("Strict super seeding") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#strict_super_seeding", "(?)"))
, &checkBoxSuperSeeding); , &m_checkBoxSuperSeeding);
// Network interface // Network interface
comboBoxInterface.addItem(tr("Any interface", "i.e. Any network interface")); m_comboBoxInterface.addItem(tr("Any interface", "i.e. Any network interface"));
const QString currentInterface = session->networkInterface(); const QString currentInterface = session->networkInterface();
bool interfaceExists = currentInterface.isEmpty(); bool interfaceExists = currentInterface.isEmpty();
int i = 1; int i = 1;
@ -468,88 +468,88 @@ void AdvancedSettings::loadAdvancedSettings()
// https://github.com/qbittorrent/qBittorrent/pull/5135 // https://github.com/qbittorrent/qBittorrent/pull/5135
if (iface.addressEntries().isEmpty()) continue; if (iface.addressEntries().isEmpty()) continue;
comboBoxInterface.addItem(iface.humanReadableName(), iface.name()); m_comboBoxInterface.addItem(iface.humanReadableName(), iface.name());
if (!currentInterface.isEmpty() && (iface.name() == currentInterface)) { if (!currentInterface.isEmpty() && (iface.name() == currentInterface)) {
comboBoxInterface.setCurrentIndex(i); m_comboBoxInterface.setCurrentIndex(i);
interfaceExists = true; interfaceExists = true;
} }
++i; ++i;
} }
// Saved interface does not exist, show it anyway // Saved interface does not exist, show it anyway
if (!interfaceExists) { if (!interfaceExists) {
comboBoxInterface.addItem(session->networkInterfaceName(), currentInterface); m_comboBoxInterface.addItem(session->networkInterfaceName(), currentInterface);
comboBoxInterface.setCurrentIndex(i); m_comboBoxInterface.setCurrentIndex(i);
} }
addRow(NETWORK_IFACE, tr("Network Interface (requires restart)"), &comboBoxInterface); addRow(NETWORK_IFACE, tr("Network Interface (requires restart)"), &m_comboBoxInterface);
// Network interface address // Network interface address
updateInterfaceAddressCombo(); updateInterfaceAddressCombo();
addRow(NETWORK_IFACE_ADDRESS, tr("Optional IP Address to bind to (requires restart)"), &comboBoxInterfaceAddress); addRow(NETWORK_IFACE_ADDRESS, tr("Optional IP Address to bind to (requires restart)"), &m_comboBoxInterfaceAddress);
// Listen on IPv6 address // Listen on IPv6 address
checkBoxListenIPv6.setChecked(session->isIPv6Enabled()); m_checkBoxListenIPv6.setChecked(session->isIPv6Enabled());
addRow(NETWORK_LISTEN_IPV6, tr("Listen on IPv6 address (requires restart)"), &checkBoxListenIPv6); addRow(NETWORK_LISTEN_IPV6, tr("Listen on IPv6 address (requires restart)"), &m_checkBoxListenIPv6);
// Announce IP // Announce IP
lineEditAnnounceIP.setText(session->announceIP()); m_lineEditAnnounceIP.setText(session->announceIP());
addRow(ANNOUNCE_IP, tr("IP Address to report to trackers (requires restart)"), &lineEditAnnounceIP); addRow(ANNOUNCE_IP, tr("IP Address to report to trackers (requires restart)"), &m_lineEditAnnounceIP);
// Program notifications // Program notifications
const MainWindow *const mainWindow = static_cast<Application*>(QCoreApplication::instance())->mainWindow(); const MainWindow *const mainWindow = static_cast<Application*>(QCoreApplication::instance())->mainWindow();
checkBoxProgramNotifications.setChecked(mainWindow->isNotificationsEnabled()); m_checkBoxProgramNotifications.setChecked(mainWindow->isNotificationsEnabled());
addRow(PROGRAM_NOTIFICATIONS, tr("Display notifications"), &checkBoxProgramNotifications); addRow(PROGRAM_NOTIFICATIONS, tr("Display notifications"), &m_checkBoxProgramNotifications);
// Torrent added notifications // Torrent added notifications
checkBoxTorrentAddedNotifications.setChecked(mainWindow->isTorrentAddedNotificationsEnabled()); m_checkBoxTorrentAddedNotifications.setChecked(mainWindow->isTorrentAddedNotificationsEnabled());
addRow(TORRENT_ADDED_NOTIFICATIONS, tr("Display notifications for added torrents"), &checkBoxTorrentAddedNotifications); addRow(TORRENT_ADDED_NOTIFICATIONS, tr("Display notifications for added torrents"), &m_checkBoxTorrentAddedNotifications);
// Download tracker's favicon // Download tracker's favicon
checkBoxTrackerFavicon.setChecked(mainWindow->isDownloadTrackerFavicon()); m_checkBoxTrackerFavicon.setChecked(mainWindow->isDownloadTrackerFavicon());
addRow(DOWNLOAD_TRACKER_FAVICON, tr("Download tracker's favicon"), &checkBoxTrackerFavicon); addRow(DOWNLOAD_TRACKER_FAVICON, tr("Download tracker's favicon"), &m_checkBoxTrackerFavicon);
// Save path history length // Save path history length
spinBoxSavePathHistoryLength.setRange(AddNewTorrentDialog::minPathHistoryLength, AddNewTorrentDialog::maxPathHistoryLength); m_spinBoxSavePathHistoryLength.setRange(AddNewTorrentDialog::minPathHistoryLength, AddNewTorrentDialog::maxPathHistoryLength);
spinBoxSavePathHistoryLength.setValue(AddNewTorrentDialog::savePathHistoryLength()); m_spinBoxSavePathHistoryLength.setValue(AddNewTorrentDialog::savePathHistoryLength());
addRow(SAVE_PATH_HISTORY_LENGTH, tr("Save path history length"), &spinBoxSavePathHistoryLength); addRow(SAVE_PATH_HISTORY_LENGTH, tr("Save path history length"), &m_spinBoxSavePathHistoryLength);
// Enable speed graphs // Enable speed graphs
checkBoxSpeedWidgetEnabled.setChecked(pref->isSpeedWidgetEnabled()); m_checkBoxSpeedWidgetEnabled.setChecked(pref->isSpeedWidgetEnabled());
addRow(ENABLE_SPEED_WIDGET, tr("Enable speed graphs"), &checkBoxSpeedWidgetEnabled); addRow(ENABLE_SPEED_WIDGET, tr("Enable speed graphs"), &m_checkBoxSpeedWidgetEnabled);
// Tracker State // Tracker State
checkBoxTrackerStatus.setChecked(session->isTrackerEnabled()); m_checkBoxTrackerStatus.setChecked(session->isTrackerEnabled());
addRow(TRACKER_STATUS, tr("Enable embedded tracker"), &checkBoxTrackerStatus); addRow(TRACKER_STATUS, tr("Enable embedded tracker"), &m_checkBoxTrackerStatus);
// Tracker port // Tracker port
spinBoxTrackerPort.setMinimum(1); m_spinBoxTrackerPort.setMinimum(1);
spinBoxTrackerPort.setMaximum(65535); m_spinBoxTrackerPort.setMaximum(65535);
spinBoxTrackerPort.setValue(pref->getTrackerPort()); m_spinBoxTrackerPort.setValue(pref->getTrackerPort());
addRow(TRACKER_PORT, tr("Embedded tracker port"), &spinBoxTrackerPort); addRow(TRACKER_PORT, tr("Embedded tracker port"), &m_spinBoxTrackerPort);
// Choking algorithm // Choking algorithm
comboBoxChokingAlgorithm.addItems({tr("Fixed slots"), tr("Upload rate based")}); m_comboBoxChokingAlgorithm.addItems({tr("Fixed slots"), tr("Upload rate based")});
comboBoxChokingAlgorithm.setCurrentIndex(static_cast<int>(session->chokingAlgorithm())); m_comboBoxChokingAlgorithm.setCurrentIndex(static_cast<int>(session->chokingAlgorithm()));
addRow(CHOKING_ALGORITHM, (tr("Upload slots behavior") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#choking_algorithm", "(?)")) addRow(CHOKING_ALGORITHM, (tr("Upload slots behavior") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#choking_algorithm", "(?)"))
, &comboBoxChokingAlgorithm); , &m_comboBoxChokingAlgorithm);
// Seed choking algorithm // Seed choking algorithm
comboBoxSeedChokingAlgorithm.addItems({tr("Round-robin"), tr("Fastest upload"), tr("Anti-leech")}); m_comboBoxSeedChokingAlgorithm.addItems({tr("Round-robin"), tr("Fastest upload"), tr("Anti-leech")});
comboBoxSeedChokingAlgorithm.setCurrentIndex(static_cast<int>(session->seedChokingAlgorithm())); m_comboBoxSeedChokingAlgorithm.setCurrentIndex(static_cast<int>(session->seedChokingAlgorithm()));
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", "(?)"))
, &comboBoxSeedChokingAlgorithm); , &m_comboBoxSeedChokingAlgorithm);
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
checkBoxUpdateCheck.setChecked(pref->isUpdateCheckEnabled()); m_checkBoxUpdateCheck.setChecked(pref->isUpdateCheckEnabled());
addRow(UPDATE_CHECK, tr("Check for software updates"), &checkBoxUpdateCheck); addRow(UPDATE_CHECK, tr("Check for software updates"), &m_checkBoxUpdateCheck);
#endif #endif
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) #if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
checkBoxUseIconTheme.setChecked(pref->useSystemIconTheme()); m_checkBoxUseIconTheme.setChecked(pref->useSystemIconTheme());
addRow(USE_ICON_THEME, tr("Use system icon theme"), &checkBoxUseIconTheme); addRow(USE_ICON_THEME, tr("Use system icon theme"), &m_checkBoxUseIconTheme);
#endif #endif
// Torrent recheck confirmation // Torrent recheck confirmation
checkBoxConfirmTorrentRecheck.setChecked(pref->confirmTorrentRecheck()); m_checkBoxConfirmTorrentRecheck.setChecked(pref->confirmTorrentRecheck());
addRow(CONFIRM_RECHECK_TORRENT, tr("Confirm torrent recheck"), &checkBoxConfirmTorrentRecheck); addRow(CONFIRM_RECHECK_TORRENT, tr("Confirm torrent recheck"), &m_checkBoxConfirmTorrentRecheck);
// Remove all tags confirmation // Remove all tags confirmation
checkBoxConfirmRemoveAllTags.setChecked(pref->confirmRemoveAllTags()); m_checkBoxConfirmRemoveAllTags.setChecked(pref->confirmRemoveAllTags());
addRow(CONFIRM_REMOVE_ALL_TAGS, tr("Confirm removal of all tags"), &checkBoxConfirmRemoveAllTags); addRow(CONFIRM_REMOVE_ALL_TAGS, tr("Confirm removal of all tags"), &m_checkBoxConfirmRemoveAllTags);
// Announce to all trackers in a tier // Announce to all trackers in a tier
checkBoxAnnounceAllTrackers.setChecked(session->announceToAllTrackers()); m_checkBoxAnnounceAllTrackers.setChecked(session->announceToAllTrackers());
addRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers in a tier"), &checkBoxAnnounceAllTrackers); addRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers in a tier"), &m_checkBoxAnnounceAllTrackers);
// Announce to all tiers // Announce to all tiers
checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers()); m_checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers());
addRow(ANNOUNCE_ALL_TIERS, tr("Always announce to all tiers"), &checkBoxAnnounceAllTiers); addRow(ANNOUNCE_ALL_TIERS, tr("Always announce to all tiers"), &m_checkBoxAnnounceAllTiers);
} }
template <typename T> template <typename T>

View file

@ -57,24 +57,24 @@ private:
void loadAdvancedSettings(); void loadAdvancedSettings();
template <typename T> void addRow(int row, const QString &text, T *widget); template <typename T> void addRow(int row, const QString &text, T *widget);
QSpinBox spinBoxAsyncIOThreads, spinBoxFilePoolSize, spinBoxCheckingMemUsage, spinBoxCache, QSpinBox m_spinBoxAsyncIOThreads, m_spinBoxFilePoolSize, m_spinBoxCheckingMemUsage, m_spinBoxCache,
spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh, m_spinBoxSaveResumeDataInterval, m_spinBoxOutgoingPortsMin, m_spinBoxOutgoingPortsMax, m_spinBoxListRefresh,
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark, m_spinBoxTrackerPort, m_spinBoxCacheTTL, m_spinBoxSendBufferWatermark, m_spinBoxSendBufferLowWatermark,
spinBoxSendBufferWatermarkFactor, spinBoxSocketBacklogSize, spinBoxSavePathHistoryLength; m_spinBoxSendBufferWatermarkFactor, m_spinBoxSocketBacklogSize, m_spinBoxSavePathHistoryLength;
QCheckBox checkBoxOsCache, checkBoxRecheckCompleted, checkBoxResolveCountries, checkBoxResolveHosts, checkBoxSuperSeeding, QCheckBox m_checkBoxOsCache, m_checkBoxRecheckCompleted, m_checkBoxResolveCountries, m_checkBoxResolveHosts, m_checkBoxSuperSeeding,
checkBoxProgramNotifications, checkBoxTorrentAddedNotifications, checkBoxTrackerFavicon, checkBoxTrackerStatus, m_checkBoxProgramNotifications, m_checkBoxTorrentAddedNotifications, m_checkBoxTrackerFavicon, m_checkBoxTrackerStatus,
checkBoxConfirmTorrentRecheck, checkBoxConfirmRemoveAllTags, checkBoxListenIPv6, checkBoxAnnounceAllTrackers, checkBoxAnnounceAllTiers, m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxListenIPv6, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers,
checkBoxMultiConnectionsPerIp, checkBoxSuggestMode, checkBoxCoalesceRW, checkBoxSpeedWidgetEnabled; m_checkBoxMultiConnectionsPerIp, m_checkBoxSuggestMode, m_checkBoxCoalesceRW, m_checkBoxSpeedWidgetEnabled;
QComboBox comboBoxInterface, comboBoxInterfaceAddress, comboBoxUtpMixedMode, comboBoxChokingAlgorithm, comboBoxSeedChokingAlgorithm; QComboBox m_comboBoxInterface, m_comboBoxInterfaceAddress, m_comboBoxUtpMixedMode, m_comboBoxChokingAlgorithm, m_comboBoxSeedChokingAlgorithm;
QLineEdit lineEditAnnounceIP; QLineEdit m_lineEditAnnounceIP;
// OS dependent settings // OS dependent settings
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
QCheckBox checkBoxUpdateCheck; QCheckBox m_checkBoxUpdateCheck;
#endif #endif
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) #if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
QCheckBox checkBoxUseIconTheme; QCheckBox m_checkBoxUseIconTheme;
#endif #endif
}; };