Options to better memory control by libtorrent. Closes #7029.

This commit is contained in:
sledgehammer999 2017-08-18 03:05:36 +03:00
parent ea793368a9
commit b649d61e8b
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
3 changed files with 26 additions and 16 deletions

View file

@ -194,7 +194,9 @@ void AdvancedSettings::saveAdvancedSettings()
void AdvancedSettings::updateCacheSpinSuffix(int value)
{
if (value <= 0)
if (value == 0)
spin_cache.setSuffix(tr(" (disabled)"));
else if (value < 0)
spin_cache.setSuffix(tr(" (auto)"));
else
spin_cache.setSuffix(tr(" MiB"));
@ -255,7 +257,7 @@ void AdvancedSettings::loadAdvancedSettings()
labelLibtorrentLink.setText(QString("<a href=\"%1\">%2</a>").arg("http://www.libtorrent.org/reference.html").arg(tr("Open documentation")));
labelLibtorrentLink.setOpenExternalLinks(true);
// Disk write cache
spin_cache.setMinimum(0);
spin_cache.setMinimum(-1);
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes.
// These macros may not be available on compilers other than MSVC and GCC
#if defined(__x86_64__) || defined(_M_X64)