- Peer Exchange can be disabled from preferences

This commit is contained in:
Christophe Dumez
2009-12-17 18:00:21 +00:00
parent ecd5c1fcc3
commit 755b8dec30
6 changed files with 38 additions and 6 deletions

View File

@@ -348,6 +348,11 @@ public:
return settings.value(QString::fromUtf8("Preferences/Bittorrent/DHT"), true).toBool();
}
static bool isPeXEnabled() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Bittorrent/PeX"), true).toBool();
}
static void setDHTEnabled(bool enabled) {
QSettings settings("qBittorrent", "qBittorrent");
settings.setValue(QString::fromUtf8("Preferences/Bittorrent/DHT"), enabled);