FEATURE: Added feature to shutdown qbittorrent on torrents completion

This commit is contained in:
Christophe Dumez
2010-10-09 14:57:41 +00:00
parent 38c56a2b5f
commit 86fb4a323a
6 changed files with 50 additions and 18 deletions

View File

@@ -935,6 +935,16 @@ public:
settings.setValue(QString::fromUtf8("Preferences/Downloads/AutoShutDownOnCompletion"), shutdown);
}
static bool shutdownqBTWhenDownloadsComplete() {
QIniSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Downloads/AutoShutDownqBTOnCompletion"), false).toBool();
}
static void setShutdownqBTWhenDownloadsComplete(bool shutdown) {
QIniSettings settings("qBittorrent", "qBittorrent");
settings.setValue(QString::fromUtf8("Preferences/Downloads/AutoShutDownqBTOnCompletion"), shutdown);
}
static uint diskCacheSize() {
QIniSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Downloads/DiskCache"), 16).toUInt();