Allow more fine tuning of uploads. Closes #684.

This commit is contained in:
sledgehammer999
2013-07-22 01:20:48 +03:00
parent 102b2dc738
commit 798bd2388b
5 changed files with 92 additions and 7 deletions

View File

@@ -588,6 +588,15 @@ public:
setValue(QString::fromUtf8("Preferences/Bittorrent/MaxConnecsPerTorrent"), val);
}
int getMaxUploads() const {
return value(QString::fromUtf8("Preferences/Bittorrent/MaxUploads"), 8).toInt();
}
void setMaxUploads(int val) {
if (val <= 0) val = -1;
setValue(QString::fromUtf8("Preferences/Bittorrent/MaxUploads"), val);
}
int getMaxUploadsPerTorrent() const {
return value(QString::fromUtf8("Preferences/Bittorrent/MaxUploadsPerTorrent"), 4).toInt();
}