From 5110994f8178c7f3c3e2ba10eebec4c60ba45992 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 1 Dec 2020 10:30:47 +0800 Subject: [PATCH 1/4] Lift upper limit of "Max concurrent HTTP announces" option Closes #13800. --- src/gui/advancedsettings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp index d7d7383f4..d0d84b9cd 100644 --- a/src/gui/advancedsettings.cpp +++ b/src/gui/advancedsettings.cpp @@ -615,6 +615,7 @@ void AdvancedSettings::loadAdvancedSettings() addRow(ANNOUNCE_IP, tr("IP Address to report to trackers (requires restart)"), &m_lineEditAnnounceIP); #if (LIBTORRENT_VERSION_NUM >= 10207) // Max concurrent HTTP announces + m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits::max()); m_spinBoxMaxConcurrentHTTPAnnounces.setValue(session->maxConcurrentHTTPAnnounces()); addRow(MAX_CONCURRENT_HTTP_ANNOUNCES, (tr("Max concurrent HTTP announces") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces", "(?)")) , &m_spinBoxMaxConcurrentHTTPAnnounces); From 8d768bda31103e5bced74e4de3f9bb169df34da0 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 1 Dec 2020 11:51:14 +0800 Subject: [PATCH 2/4] Add links to libtorrent documentation --- src/gui/advancedsettings.cpp | 24 +++++++++++++++----- src/webui/www/private/views/preferences.html | 12 +++++----- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp index d0d84b9cd..93d757a10 100644 --- a/src/gui/advancedsettings.cpp +++ b/src/gui/advancedsettings.cpp @@ -534,12 +534,16 @@ void AdvancedSettings::loadAdvancedSettings() m_spinBoxOutgoingPortsMin.setMinimum(0); m_spinBoxOutgoingPortsMin.setMaximum(65535); m_spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin()); - addRow(OUTGOING_PORT_MIN, tr("Outgoing ports (Min) [0: Disabled]"), &m_spinBoxOutgoingPortsMin); + addRow(OUTGOING_PORT_MIN, (tr("Outgoing ports (Min) [0: Disabled]") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)")) + , &m_spinBoxOutgoingPortsMin); // Outgoing port Min m_spinBoxOutgoingPortsMax.setMinimum(0); m_spinBoxOutgoingPortsMax.setMaximum(65535); m_spinBoxOutgoingPortsMax.setValue(session->outgoingPortsMax()); - addRow(OUTGOING_PORT_MAX, tr("Outgoing ports (Max) [0: Disabled]"), &m_spinBoxOutgoingPortsMax); + addRow(OUTGOING_PORT_MAX, (tr("Outgoing ports (Max) [0: Disabled]") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)")) + , &m_spinBoxOutgoingPortsMax); #if (LIBTORRENT_VERSION_NUM >= 10206) // UPnP lease duration m_spinBoxUPnPLeaseDuration.setMinimum(0); @@ -557,7 +561,9 @@ void AdvancedSettings::loadAdvancedSettings() , &m_comboBoxUtpMixedMode); // multiple connections per IP m_checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled()); - addRow(MULTI_CONNECTIONS_PER_IP, tr("Allow multiple connections from the same IP address"), &m_checkBoxMultiConnectionsPerIp); + addRow(MULTI_CONNECTIONS_PER_IP, (tr("Allow multiple connections from the same IP address") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip", "(?)")) + , &m_checkBoxMultiConnectionsPerIp); #ifdef HAS_HTTPS_TRACKER_VALIDATION // Validate HTTPS tracker certificate m_checkBoxValidateHTTPSTrackerCertificate.setChecked(session->validateHTTPSTrackerCertificate()); @@ -612,7 +618,9 @@ void AdvancedSettings::loadAdvancedSettings() addRow(NETWORK_IFACE_ADDRESS, tr("Optional IP address to bind to"), &m_comboBoxInterfaceAddress); // Announce IP m_lineEditAnnounceIP.setText(session->announceIP()); - addRow(ANNOUNCE_IP, tr("IP Address to report to trackers (requires restart)"), &m_lineEditAnnounceIP); + addRow(ANNOUNCE_IP, (tr("IP Address to report to trackers (requires restart)") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_ip", "(?)")) + , &m_lineEditAnnounceIP); #if (LIBTORRENT_VERSION_NUM >= 10207) // Max concurrent HTTP announces m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits::max()); @@ -672,11 +680,15 @@ void AdvancedSettings::loadAdvancedSettings() // Announce to all trackers in a tier m_checkBoxAnnounceAllTrackers.setChecked(session->announceToAllTrackers()); - addRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers in a tier"), &m_checkBoxAnnounceAllTrackers); + addRow(ANNOUNCE_ALL_TRACKERS, (tr("Always announce to all trackers in a tier") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers", "(?)")) + , &m_checkBoxAnnounceAllTrackers); // Announce to all tiers m_checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers()); - addRow(ANNOUNCE_ALL_TIERS, tr("Always announce to all tiers"), &m_checkBoxAnnounceAllTiers); + addRow(ANNOUNCE_ALL_TIERS, (tr("Always announce to all tiers") + + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers", "(?)")) + , &m_checkBoxAnnounceAllTiers); m_spinBoxPeerTurnover.setMinimum(0); m_spinBoxPeerTurnover.setMaximum(100); diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index b6f32666d..e127e21aa 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -1050,7 +1050,7 @@ - + @@ -1058,7 +1058,7 @@ - + @@ -1085,7 +1085,7 @@ - + @@ -1148,7 +1148,7 @@ - + @@ -1156,7 +1156,7 @@ - + @@ -1164,7 +1164,7 @@ - + From bd672c4c4e19d1a2b2c2899ebd377ba6fb4f2239 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 1 Dec 2020 12:09:36 +0800 Subject: [PATCH 3/4] Move "embedded tracker" options to qbt section --- src/gui/advancedsettings.cpp | 6 ++-- src/webui/www/private/views/preferences.html | 32 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp index 93d757a10..18a84cf63 100644 --- a/src/gui/advancedsettings.cpp +++ b/src/gui/advancedsettings.cpp @@ -82,6 +82,9 @@ namespace DOWNLOAD_TRACKER_FAVICON, SAVE_PATH_HISTORY_LENGTH, ENABLE_SPEED_WIDGET, + // embedded tracker + TRACKER_STATUS, + TRACKER_PORT, // libtorrent section LIBTORRENT_HEADER, ASYNC_IO_THREADS, @@ -119,9 +122,6 @@ namespace VALIDATE_HTTPS_TRACKER_CERTIFICATE, #endif BLOCK_PEERS_ON_PRIVILEGED_PORTS, - // embedded tracker - TRACKER_STATUS, - TRACKER_PORT, // seeding CHOKING_ALGORITHM, SEED_CHOKING_ALGORITHM, diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index e127e21aa..76ece65fa 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -931,6 +931,22 @@ + + + + + + + + + + + + + + + +
@@ -1107,22 +1123,6 @@ - - - - - - - - - - - - - - - - From 6aa5abf298dd8c0151ba56d13d4d13b99d1a7f78 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 1 Dec 2020 12:13:22 +0800 Subject: [PATCH 4/4] Update URL to libtorrent settings --- src/gui/advancedsettings.cpp | 2 +- src/webui/www/private/views/preferences.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp index 18a84cf63..998e3a79a 100644 --- a/src/gui/advancedsettings.cpp +++ b/src/gui/advancedsettings.cpp @@ -383,7 +383,7 @@ void AdvancedSettings::loadAdvancedSettings() static_cast(cellWidget(QBITTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); auto *labelLibtorrentLink = new QLabel( - makeLink(QLatin1String("https://www.libtorrent.org/reference.html") + makeLink(QLatin1String("https://www.libtorrent.org/reference-Settings.html") , tr("Open documentation")) , this); labelLibtorrentLink->setOpenExternalLinks(true); diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index 76ece65fa..a8cf6a83b 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -950,7 +950,7 @@
- QBT_TR(libtorrent Section)QBT_TR[CONTEXT=OptionsDialog] (QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer]) + QBT_TR(libtorrent Section)QBT_TR[CONTEXT=OptionsDialog] (QBT_TR(Open documentation)QBT_TR[CONTEXT=HttpServer])