mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Use QString literals
This patch covers src/gui and some leftovers from previous commit.
This commit is contained in:
parent
5341478036
commit
802ec5a14e
59 changed files with 912 additions and 902 deletions
|
@ -47,7 +47,7 @@ namespace
|
|||
{
|
||||
QString makeLink(const QString &url, const QString &linkLabel)
|
||||
{
|
||||
return QStringLiteral("<a href=\"%1\">%2</a>").arg(url, linkLabel);
|
||||
return u"<a href=\"%1\">%2</a>"_qs.arg(url, linkLabel);
|
||||
}
|
||||
|
||||
enum AdvSettingsCols
|
||||
|
@ -443,7 +443,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
}
|
||||
m_comboBoxOSMemoryPriority.setCurrentIndex(OSMemoryPriorityIndex);
|
||||
addRow(OS_MEMORY_PRIORITY, (tr("Process memory priority (Windows >= 8 only)")
|
||||
+ ' ' + makeLink("https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-memory_priority_information", "(?)"))
|
||||
+ u' ' + makeLink(u"https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-memory_priority_information"_qs, u"(?)"_qs))
|
||||
, &m_comboBoxOSMemoryPriority);
|
||||
|
||||
m_spinBoxMemoryWorkingSetLimit.setMinimum(1);
|
||||
|
@ -452,7 +452,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxMemoryWorkingSetLimit.setValue(static_cast<Application *>(QCoreApplication::instance())->memoryWorkingSetLimit());
|
||||
|
||||
addRow(MEMORY_WORKING_SET_LIMIT, (tr("Physical memory (RAM) usage limit")
|
||||
+ ' ' + makeLink("https://wikipedia.org/wiki/Working_set", "(?)"))
|
||||
+ u' ' + makeLink(u"https://wikipedia.org/wiki/Working_set"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxMemoryWorkingSetLimit);
|
||||
#endif
|
||||
|
||||
|
@ -460,7 +460,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxAsyncIOThreads.setMinimum(1);
|
||||
m_spinBoxAsyncIOThreads.setMaximum(1024);
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#aio_threads"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxAsyncIOThreads);
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
|
@ -468,7 +468,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxHashingThreads.setMinimum(1);
|
||||
m_spinBoxHashingThreads.setMaximum(1024);
|
||||
m_spinBoxHashingThreads.setValue(session->hashingThreads());
|
||||
addRow(HASHING_THREADS, (tr("Hashing threads") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#hashing_threads", "(?)"))
|
||||
addRow(HASHING_THREADS, (tr("Hashing threads") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#hashing_threads"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxHashingThreads);
|
||||
#endif
|
||||
|
||||
|
@ -476,7 +476,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxFilePoolSize.setMinimum(1);
|
||||
m_spinBoxFilePoolSize.setMaximum(std::numeric_limits<int>::max());
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#file_pool_size"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxFilePoolSize);
|
||||
|
||||
// Checking Memory Usage
|
||||
|
@ -490,7 +490,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
#endif
|
||||
m_spinBoxCheckingMemUsage.setValue(session->checkingMemUsage());
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#checking_mem_usage"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxCheckingMemUsage);
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
// Disk write cache
|
||||
|
@ -506,14 +506,14 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
updateCacheSpinSuffix(m_spinBoxCache.value());
|
||||
connect(&m_spinBoxCache, qOverload<int>(&QSpinBox::valueChanged)
|
||||
, this, &AdvancedSettings::updateCacheSpinSuffix);
|
||||
addRow(DISK_CACHE, (tr("Disk cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_size", "(?)"))
|
||||
addRow(DISK_CACHE, (tr("Disk cache") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#cache_size"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxCache);
|
||||
// Disk cache expiry
|
||||
m_spinBoxCacheTTL.setMinimum(1);
|
||||
m_spinBoxCacheTTL.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxCacheTTL.setValue(session->diskCacheTTL());
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#cache_expiry"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxCacheTTL);
|
||||
#endif
|
||||
// Disk queue size
|
||||
|
@ -521,55 +521,55 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxDiskQueueSize.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxDiskQueueSize.setValue(session->diskQueueSize() / 1024);
|
||||
m_spinBoxDiskQueueSize.setSuffix(tr(" KiB"));
|
||||
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes", "(?)"))
|
||||
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxDiskQueueSize);
|
||||
// Enable OS cache
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxOsCache);
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
// Coalesce reads & writes
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#coalesce_reads"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxCoalesceRW);
|
||||
#endif
|
||||
// Piece extent affinity
|
||||
m_checkBoxPieceExtentAffinity.setChecked(session->usePieceExtentAffinity());
|
||||
addRow(PIECE_EXTENT_AFFINITY, (tr("Use piece extent affinity") + ' ' + makeLink("https://libtorrent.org/single-page-ref.html#piece_extent_affinity", "(?)")), &m_checkBoxPieceExtentAffinity);
|
||||
addRow(PIECE_EXTENT_AFFINITY, (tr("Use piece extent affinity") + u' ' + makeLink(u"https://libtorrent.org/single-page-ref.html#piece_extent_affinity"_qs, u"(?)"_qs)), &m_checkBoxPieceExtentAffinity);
|
||||
// Suggest mode
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#suggest_mode"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxSuggestMode);
|
||||
// Send buffer watermark
|
||||
m_spinBoxSendBufferWatermark.setMinimum(1);
|
||||
m_spinBoxSendBufferWatermark.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxSendBufferWatermark.setSuffix(tr(" KiB"));
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxSendBufferWatermark);
|
||||
m_spinBoxSendBufferLowWatermark.setMinimum(1);
|
||||
m_spinBoxSendBufferLowWatermark.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxSendBufferLowWatermark.setSuffix(tr(" KiB"));
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#send_buffer_low_watermark"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxSendBufferLowWatermark);
|
||||
m_spinBoxSendBufferWatermarkFactor.setMinimum(1);
|
||||
m_spinBoxSendBufferWatermarkFactor.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxSendBufferWatermarkFactor.setSuffix(" %");
|
||||
m_spinBoxSendBufferWatermarkFactor.setSuffix(u" %"_qs);
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#send_buffer_watermark_factor"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxSendBufferWatermarkFactor);
|
||||
// Outgoing connections per second
|
||||
m_spinBoxConnectionSpeed.setMinimum(0);
|
||||
m_spinBoxConnectionSpeed.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxConnectionSpeed.setValue(session->connectionSpeed());
|
||||
addRow(CONNECTION_SPEED, (tr("Outgoing connections per second") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#connection_speed", "(?)"))
|
||||
addRow(CONNECTION_SPEED, (tr("Outgoing connections per second") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#connection_speed"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxConnectionSpeed);
|
||||
// Socket listen backlog size
|
||||
m_spinBoxSocketBacklogSize.setMinimum(1);
|
||||
m_spinBoxSocketBacklogSize.setMaximum(std::numeric_limits<int>::max());
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#listen_queue_size"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxSocketBacklogSize);
|
||||
// Save resume data interval
|
||||
m_spinBoxSaveResumeDataInterval.setMinimum(0);
|
||||
|
@ -584,57 +584,57 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxOutgoingPortsMin.setMaximum(65535);
|
||||
m_spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin());
|
||||
addRow(OUTGOING_PORT_MIN, (tr("Outgoing ports (Min) [0: Disabled]")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#outgoing_port"_qs, u"(?)"_qs))
|
||||
, &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]")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#outgoing_port"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxOutgoingPortsMax);
|
||||
// UPnP lease duration
|
||||
m_spinBoxUPnPLeaseDuration.setMinimum(0);
|
||||
m_spinBoxUPnPLeaseDuration.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxUPnPLeaseDuration.setValue(session->UPnPLeaseDuration());
|
||||
m_spinBoxUPnPLeaseDuration.setSuffix(tr(" s", " seconds"));
|
||||
addRow(UPNP_LEASE_DURATION, (tr("UPnP lease duration [0: Permanent lease]") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration", "(?)"))
|
||||
addRow(UPNP_LEASE_DURATION, (tr("UPnP lease duration [0: Permanent lease]") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxUPnPLeaseDuration);
|
||||
// Type of service
|
||||
m_spinBoxPeerToS.setMinimum(0);
|
||||
m_spinBoxPeerToS.setMaximum(255);
|
||||
m_spinBoxPeerToS.setValue(session->peerToS());
|
||||
addRow(PEER_TOS, (tr("Type of service (ToS) for connections to peers") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_tos", "(?)"))
|
||||
addRow(PEER_TOS, (tr("Type of service (ToS) for connections to peers") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#peer_tos"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxPeerToS);
|
||||
// uTP-TCP mixed mode
|
||||
m_comboBoxUtpMixedMode.addItems({tr("Prefer TCP"), tr("Peer proportional (throttles TCP)")});
|
||||
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)
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm"_qs, u"(?)"_qs))
|
||||
, &m_comboBoxUtpMixedMode);
|
||||
// Support internationalized domain name (IDN)
|
||||
m_checkBoxIDNSupport.setChecked(session->isIDNSupportEnabled());
|
||||
addRow(IDN_SUPPORT, (tr("Support internationalized domain name (IDN)")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#allow_idna", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#allow_idna"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxIDNSupport);
|
||||
// multiple connections per IP
|
||||
m_checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled());
|
||||
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", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxMultiConnectionsPerIp);
|
||||
// Validate HTTPS tracker certificate
|
||||
m_checkBoxValidateHTTPSTrackerCertificate.setChecked(session->validateHTTPSTrackerCertificate());
|
||||
addRow(VALIDATE_HTTPS_TRACKER_CERTIFICATE, (tr("Validate HTTPS tracker certificates")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#validate_https_trackers", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#validate_https_trackers"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxValidateHTTPSTrackerCertificate);
|
||||
// SSRF mitigation
|
||||
m_checkBoxSSRFMitigation.setChecked(session->isSSRFMitigationEnabled());
|
||||
addRow(SSRF_MITIGATION, (tr("Server-side request forgery (SSRF) mitigation")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#ssrf_mitigation", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#ssrf_mitigation"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxSSRFMitigation);
|
||||
// Disallow connection to peers on privileged ports
|
||||
m_checkBoxBlockPeersOnPrivilegedPorts.setChecked(session->blockPeersOnPrivilegedPorts());
|
||||
addRow(BLOCK_PEERS_ON_PRIVILEGED_PORTS, (tr("Disallow connection to peers on privileged ports") + ' ' + makeLink("https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports", "(?)")), &m_checkBoxBlockPeersOnPrivilegedPorts);
|
||||
addRow(BLOCK_PEERS_ON_PRIVILEGED_PORTS, (tr("Disallow connection to peers on privileged ports") + u' ' + makeLink(u"https://libtorrent.org/single-page-ref.html#no_connect_privileged_ports"_qs, u"(?)"_qs)), &m_checkBoxBlockPeersOnPrivilegedPorts);
|
||||
// Recheck completed torrents
|
||||
m_checkBoxRecheckCompleted.setChecked(pref->recheckTorrentsOnCompletion());
|
||||
addRow(RECHECK_COMPLETED, tr("Recheck torrents on completion"), &m_checkBoxRecheckCompleted);
|
||||
|
@ -680,17 +680,17 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
// Announce IP
|
||||
m_lineEditAnnounceIP.setText(session->announceIP());
|
||||
addRow(ANNOUNCE_IP, (tr("IP address reported to trackers (requires restart)")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_ip", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#announce_ip"_qs, u"(?)"_qs))
|
||||
, &m_lineEditAnnounceIP);
|
||||
// Max concurrent HTTP announces
|
||||
m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits<int>::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", "(?)"))
|
||||
addRow(MAX_CONCURRENT_HTTP_ANNOUNCES, (tr("Max concurrent HTTP announces") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxMaxConcurrentHTTPAnnounces);
|
||||
// Stop tracker timeout
|
||||
m_spinBoxStopTrackerTimeout.setValue(session->stopTrackerTimeout());
|
||||
m_spinBoxStopTrackerTimeout.setSuffix(tr(" s", " seconds"));
|
||||
addRow(STOP_TRACKER_TIMEOUT, (tr("Stop tracker timeout") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout", "(?)"))
|
||||
addRow(STOP_TRACKER_TIMEOUT, (tr("Stop tracker timeout") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#stop_tracker_timeout"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxStopTrackerTimeout);
|
||||
|
||||
// Program notifications
|
||||
|
@ -738,12 +738,12 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
// Choking algorithm
|
||||
m_comboBoxChokingAlgorithm.addItems({tr("Fixed slots"), tr("Upload rate based")});
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#choking_algorithm"_qs, u"(?)"_qs))
|
||||
, &m_comboBoxChokingAlgorithm);
|
||||
// Seed choking algorithm
|
||||
m_comboBoxSeedChokingAlgorithm.addItems({tr("Round-robin"), tr("Fastest upload"), tr("Anti-leech")});
|
||||
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") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#seed_choking_algorithm"_qs, u"(?)"_qs))
|
||||
, &m_comboBoxSeedChokingAlgorithm);
|
||||
|
||||
// Torrent recheck confirmation
|
||||
|
@ -757,38 +757,38 @@ 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")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxAnnounceAllTrackers);
|
||||
|
||||
// Announce to all tiers
|
||||
m_checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers());
|
||||
addRow(ANNOUNCE_ALL_TIERS, (tr("Always announce to all tiers")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers", "(?)"))
|
||||
+ u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers"_qs, u"(?)"_qs))
|
||||
, &m_checkBoxAnnounceAllTiers);
|
||||
|
||||
m_spinBoxPeerTurnover.setMinimum(0);
|
||||
m_spinBoxPeerTurnover.setMaximum(100);
|
||||
m_spinBoxPeerTurnover.setValue(session->peerTurnover());
|
||||
m_spinBoxPeerTurnover.setSuffix(" %");
|
||||
addRow(PEER_TURNOVER, (tr("Peer turnover disconnect percentage") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)"))
|
||||
m_spinBoxPeerTurnover.setSuffix(u" %"_qs);
|
||||
addRow(PEER_TURNOVER, (tr("Peer turnover disconnect percentage") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#peer_turnover"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxPeerTurnover);
|
||||
m_spinBoxPeerTurnoverCutoff.setMinimum(0);
|
||||
m_spinBoxPeerTurnoverCutoff.setMaximum(100);
|
||||
m_spinBoxPeerTurnoverCutoff.setSuffix(" %");
|
||||
m_spinBoxPeerTurnoverCutoff.setSuffix(u" %"_qs);
|
||||
m_spinBoxPeerTurnoverCutoff.setValue(session->peerTurnoverCutoff());
|
||||
addRow(PEER_TURNOVER_CUTOFF, (tr("Peer turnover threshold percentage") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)"))
|
||||
addRow(PEER_TURNOVER_CUTOFF, (tr("Peer turnover threshold percentage") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#peer_turnover"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxPeerTurnoverCutoff);
|
||||
m_spinBoxPeerTurnoverInterval.setMinimum(30);
|
||||
m_spinBoxPeerTurnoverInterval.setMaximum(3600);
|
||||
m_spinBoxPeerTurnoverInterval.setSuffix(tr(" s", " seconds"));
|
||||
m_spinBoxPeerTurnoverInterval.setValue(session->peerTurnoverInterval());
|
||||
addRow(PEER_TURNOVER_INTERVAL, (tr("Peer turnover disconnect interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)"))
|
||||
addRow(PEER_TURNOVER_INTERVAL, (tr("Peer turnover disconnect interval") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#peer_turnover"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxPeerTurnoverInterval);
|
||||
// Maximum outstanding requests to a single peer
|
||||
m_spinBoxRequestQueueSize.setMinimum(1);
|
||||
m_spinBoxRequestQueueSize.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxRequestQueueSize.setValue(session->requestQueueSize());
|
||||
addRow(REQUEST_QUEUE_SIZE, (tr("Maximum outstanding requests to a single peer") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_out_request_queue", "(?)"))
|
||||
addRow(REQUEST_QUEUE_SIZE, (tr("Maximum outstanding requests to a single peer") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#max_out_request_queue"_qs, u"(?)"_qs))
|
||||
, &m_spinBoxRequestQueueSize);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue