Simplify uTP settings

This commit is contained in:
Christophe Dumez
2011-04-17 18:11:03 +00:00
parent f843a4b13a
commit 52e7d4ad03
38 changed files with 2751 additions and 3244 deletions

View File

@@ -64,9 +64,6 @@ enum Style { NORMAL = 0, MONO_DARK, MONO_LIGHT };
namespace DNS {
enum Service { DYNDNS, NOIP };
}
namespace BT {
enum Protocol { TCP_uTP, TCP, uTP };
}
class Preferences : public QIniSettings {
Q_DISABLE_COPY(Preferences);
@@ -540,12 +537,12 @@ public:
setValue(QString::fromUtf8("Preferences/Bittorrent/MaxUploadsPerTorrent"), val);
}
BT::Protocol getBTProtocol() const {
return (BT::Protocol)value(QString::fromUtf8("Preferences/Bittorrent/Protocol"), BT::TCP_uTP).toInt();
bool isuTPEnabled() const {
return value(QString::fromUtf8("Preferences/Bittorrent/uTP"), true).toBool();
}
void setBTProtocol(int protocol) {
setValue("Preferences/Bittorrent/Protocol", protocol);
void setuTPEnabled(bool enabled) {
setValue("Preferences/Bittorrent/uTP", enabled);
}
bool isuTPRateLimited() const {