mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Use KiB unit for socket buffer sizes
https://github.com/qbittorrent/qBittorrent/pull/18806#issuecomment-1499894871
This commit is contained in:
parent
cecf2d28e6
commit
a9ab2d9b9e
@ -231,9 +231,9 @@ void AdvancedSettings::saveAdvancedSettings() const
|
|||||||
// Outgoing connections per second
|
// Outgoing connections per second
|
||||||
session->setConnectionSpeed(m_spinBoxConnectionSpeed.value());
|
session->setConnectionSpeed(m_spinBoxConnectionSpeed.value());
|
||||||
// Socket send buffer size
|
// Socket send buffer size
|
||||||
session->setSocketSendBufferSize(m_spinBoxSocketSendBufferSize.value());
|
session->setSocketSendBufferSize(m_spinBoxSocketSendBufferSize.value() * 1024);
|
||||||
// Socket receive buffer size
|
// Socket receive buffer size
|
||||||
session->setSocketReceiveBufferSize(m_spinBoxSocketReceiveBufferSize.value());
|
session->setSocketReceiveBufferSize(m_spinBoxSocketReceiveBufferSize.value() * 1024);
|
||||||
// Socket listen backlog size
|
// Socket listen backlog size
|
||||||
session->setSocketBacklogSize(m_spinBoxSocketBacklogSize.value());
|
session->setSocketBacklogSize(m_spinBoxSocketBacklogSize.value());
|
||||||
// Save resume data interval
|
// Save resume data interval
|
||||||
@ -506,7 +506,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
#endif
|
#endif
|
||||||
// Disk queue size
|
// Disk queue size
|
||||||
m_spinBoxDiskQueueSize.setMinimum(1);
|
m_spinBoxDiskQueueSize.setMinimum(1);
|
||||||
m_spinBoxDiskQueueSize.setMaximum(std::numeric_limits<int>::max());
|
m_spinBoxDiskQueueSize.setMaximum(std::numeric_limits<int>::max() / 1024);
|
||||||
m_spinBoxDiskQueueSize.setValue(session->diskQueueSize() / 1024);
|
m_spinBoxDiskQueueSize.setValue(session->diskQueueSize() / 1024);
|
||||||
m_spinBoxDiskQueueSize.setSuffix(tr(" KiB"));
|
m_spinBoxDiskQueueSize.setSuffix(tr(" KiB"));
|
||||||
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes", u"(?)"))
|
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes", u"(?)"))
|
||||||
@ -575,17 +575,17 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
, &m_spinBoxConnectionSpeed);
|
, &m_spinBoxConnectionSpeed);
|
||||||
// Socket send buffer size
|
// Socket send buffer size
|
||||||
m_spinBoxSocketSendBufferSize.setMinimum(0);
|
m_spinBoxSocketSendBufferSize.setMinimum(0);
|
||||||
m_spinBoxSocketSendBufferSize.setMaximum(std::numeric_limits<int>::max());
|
m_spinBoxSocketSendBufferSize.setMaximum(std::numeric_limits<int>::max() / 1024);
|
||||||
m_spinBoxSocketSendBufferSize.setValue(session->socketSendBufferSize());
|
m_spinBoxSocketSendBufferSize.setValue(session->socketSendBufferSize() / 1024);
|
||||||
m_spinBoxSocketSendBufferSize.setSuffix(tr(" Bytes"));
|
m_spinBoxSocketSendBufferSize.setSuffix(tr(" KiB"));
|
||||||
m_spinBoxSocketSendBufferSize.setSpecialValueText(tr("System default"));
|
m_spinBoxSocketSendBufferSize.setSpecialValueText(tr("System default"));
|
||||||
addRow(SOCKET_SEND_BUFFER_SIZE, (tr("Socket send buffer size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size", u"(?)"))
|
addRow(SOCKET_SEND_BUFFER_SIZE, (tr("Socket send buffer size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size", u"(?)"))
|
||||||
, &m_spinBoxSocketSendBufferSize);
|
, &m_spinBoxSocketSendBufferSize);
|
||||||
// Socket receive buffer size
|
// Socket receive buffer size
|
||||||
m_spinBoxSocketReceiveBufferSize.setMinimum(0);
|
m_spinBoxSocketReceiveBufferSize.setMinimum(0);
|
||||||
m_spinBoxSocketReceiveBufferSize.setMaximum(std::numeric_limits<int>::max());
|
m_spinBoxSocketReceiveBufferSize.setMaximum(std::numeric_limits<int>::max() / 1024);
|
||||||
m_spinBoxSocketReceiveBufferSize.setValue(session->socketReceiveBufferSize());
|
m_spinBoxSocketReceiveBufferSize.setValue(session->socketReceiveBufferSize() / 1024);
|
||||||
m_spinBoxSocketReceiveBufferSize.setSuffix(tr(" Bytes"));
|
m_spinBoxSocketReceiveBufferSize.setSuffix(tr(" KiB"));
|
||||||
m_spinBoxSocketReceiveBufferSize.setSpecialValueText(tr("System default"));
|
m_spinBoxSocketReceiveBufferSize.setSpecialValueText(tr("System default"));
|
||||||
addRow(SOCKET_RECEIVE_BUFFER_SIZE, (tr("Socket receive buffer size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size", u"(?)"))
|
addRow(SOCKET_RECEIVE_BUFFER_SIZE, (tr("Socket receive buffer size") + u' ' + makeLink(u"https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size", u"(?)"))
|
||||||
, &m_spinBoxSocketReceiveBufferSize);
|
, &m_spinBoxSocketReceiveBufferSize);
|
||||||
|
@ -1189,7 +1189,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||||||
<label for="socketSendBufferSize">QBT_TR(Socket send buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size" target="_blank">(?)</a></label>
|
<label for="socketSendBufferSize">QBT_TR(Socket send buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#send_socket_buffer_size" target="_blank">(?)</a></label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="socketSendBufferSize" style="width: 15em;" /> QBT_TR(Bytes)QBT_TR[CONTEXT=OptionsDialog]
|
<input type="text" id="socketSendBufferSize" style="width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -1197,7 +1197,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||||||
<label for="socketReceiveBufferSize">QBT_TR(Socket receive buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size" target="_blank">(?)</a></label>
|
<label for="socketReceiveBufferSize">QBT_TR(Socket receive buffer size [0: system default]:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#recv_socket_buffer_size" target="_blank">(?)</a></label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="socketReceiveBufferSize" style="width: 15em;" /> QBT_TR(Bytes)QBT_TR[CONTEXT=OptionsDialog]
|
<input type="text" id="socketReceiveBufferSize" style="width: 15em;" /> QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -2161,8 +2161,8 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||||||
$('sendBufferLowWatermark').setProperty('value', pref.send_buffer_low_watermark);
|
$('sendBufferLowWatermark').setProperty('value', pref.send_buffer_low_watermark);
|
||||||
$('sendBufferWatermarkFactor').setProperty('value', pref.send_buffer_watermark_factor);
|
$('sendBufferWatermarkFactor').setProperty('value', pref.send_buffer_watermark_factor);
|
||||||
$('connectionSpeed').setProperty('value', pref.connection_speed);
|
$('connectionSpeed').setProperty('value', pref.connection_speed);
|
||||||
$('socketSendBufferSize').setProperty('value', pref.socket_send_buffer_size);
|
$('socketSendBufferSize').setProperty('value', (pref.socket_send_buffer_size / 1024));
|
||||||
$('socketReceiveBufferSize').setProperty('value', pref.socket_receive_buffer_size);
|
$('socketReceiveBufferSize').setProperty('value', (pref.socket_receive_buffer_size / 1024));
|
||||||
$('socketBacklogSize').setProperty('value', pref.socket_backlog_size);
|
$('socketBacklogSize').setProperty('value', pref.socket_backlog_size);
|
||||||
$('outgoingPortsMin').setProperty('value', pref.outgoing_ports_min);
|
$('outgoingPortsMin').setProperty('value', pref.outgoing_ports_min);
|
||||||
$('outgoingPortsMax').setProperty('value', pref.outgoing_ports_max);
|
$('outgoingPortsMax').setProperty('value', pref.outgoing_ports_max);
|
||||||
@ -2578,8 +2578,8 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||||||
settings.set('send_buffer_low_watermark', $('sendBufferLowWatermark').getProperty('value'));
|
settings.set('send_buffer_low_watermark', $('sendBufferLowWatermark').getProperty('value'));
|
||||||
settings.set('send_buffer_watermark_factor', $('sendBufferWatermarkFactor').getProperty('value'));
|
settings.set('send_buffer_watermark_factor', $('sendBufferWatermarkFactor').getProperty('value'));
|
||||||
settings.set('connection_speed', $('connectionSpeed').getProperty('value'));
|
settings.set('connection_speed', $('connectionSpeed').getProperty('value'));
|
||||||
settings.set('socket_send_buffer_size', $('socketSendBufferSize').getProperty('value'));
|
settings.set('socket_send_buffer_size', ($('socketSendBufferSize').getProperty('value') * 1024));
|
||||||
settings.set('socket_receive_buffer_size', $('socketReceiveBufferSize').getProperty('value'));
|
settings.set('socket_receive_buffer_size', ($('socketReceiveBufferSize').getProperty('value') * 1024));
|
||||||
settings.set('socket_backlog_size', $('socketBacklogSize').getProperty('value'));
|
settings.set('socket_backlog_size', $('socketBacklogSize').getProperty('value'));
|
||||||
settings.set('outgoing_ports_min', $('outgoingPortsMin').getProperty('value'));
|
settings.set('outgoing_ports_min', $('outgoingPortsMin').getProperty('value'));
|
||||||
settings.set('outgoing_ports_max', $('outgoingPortsMax').getProperty('value'));
|
settings.set('outgoing_ports_max', $('outgoingPortsMax').getProperty('value'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user