mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Added uTP support
This commit is contained in:
@@ -62,7 +62,10 @@ namespace TrayIcon {
|
||||
enum Style { NORMAL = 0, MONO_DARK, MONO_LIGHT };
|
||||
}
|
||||
namespace DNS {
|
||||
enum Service { DYNDNS, NOIP };
|
||||
enum Service { DYNDNS, NOIP };
|
||||
}
|
||||
namespace BT {
|
||||
enum Protocol { TCP_uTP, TCP, uTP };
|
||||
}
|
||||
|
||||
class Preferences : public QIniSettings {
|
||||
@@ -537,6 +540,22 @@ 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();
|
||||
}
|
||||
|
||||
void setBTProtocol(int protocol) {
|
||||
setValue("Preferences/Bittorrent/Protocol", protocol);
|
||||
}
|
||||
|
||||
bool isuTPRateLimited() const {
|
||||
return value(QString::fromUtf8("Preferences/Bittorrent/uTP_rate_limiting"), false).toBool();
|
||||
}
|
||||
|
||||
void setuTPRateLimited(bool enabled) {
|
||||
setValue("Preferences/Bittorrent/uTP_rate_limiting", enabled);
|
||||
}
|
||||
|
||||
bool isDHTEnabled() const {
|
||||
return value(QString::fromUtf8("Preferences/Bittorrent/DHT"), true).toBool();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user