- Created "Advanced settings" tab in program preferences and moved "Disk cache" there

This commit is contained in:
Christophe Dumez
2010-01-31 15:11:15 +00:00
parent e24e7578f2
commit 8618f13b7a
8 changed files with 149 additions and 59 deletions

View File

@@ -181,9 +181,14 @@ public:
return settings.setValue(QString::fromUtf8("Preferences/Downloads/PreAllocation"), enabled);
}
static int diskCacheSize() {
static uint diskCacheSize() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Downloads/DiskCache"), 16).toInt();
return settings.value(QString::fromUtf8("Preferences/Downloads/DiskCache"), 16).toUInt();
}
static void setDiskCacheSize(uint size) {
QSettings settings("qBittorrent", "qBittorrent");
settings.setValue(QString::fromUtf8("Preferences/Downloads/DiskCache"), size);
}
static bool useAdditionDialog() {