Merge msvc fixes from stable branch

This commit is contained in:
Christophe Dumez
2010-06-05 18:59:05 +00:00
parent 682377ff66
commit 8ec1621334
13 changed files with 87 additions and 51 deletions

View File

@@ -36,6 +36,7 @@
#include <QPair>
#include <QDir>
#include <QTime>
#include <QList>
#ifndef DISABLE_GUI
#include <QApplication>
@@ -47,6 +48,8 @@
#include <QDesktopServices>
#endif
#include "misc.h"
#define QBT_REALM "Web UI Access"
enum scheduler_days { EVERY_DAY, WEEK_DAYS, WEEK_ENDS, MON, TUE, WED, THU, FRI, SAT, SUN };
@@ -223,14 +226,14 @@ public:
settings.setValue(QString::fromUtf8("Preferences/Downloads/ScanDirs"), dirs);
}
static QVariantList getDownloadInScanDirs() {
static QList<bool> getDownloadInScanDirs() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/Downloads/DownloadInScanDirs"), QVariantList()).toList();
return misc::boolListfromStringList(settings.value(QString::fromUtf8("Preferences/Downloads/DownloadInScanDirs")).toStringList());
}
static void setDownloadInScanDirs(const QVariantList &list) {
static void setDownloadInScanDirs(const QList<bool> &list) {
QSettings settings("qBittorrent", "qBittorrent");
settings.setValue(QString::fromUtf8("Preferences/Downloads/DownloadInScanDirs"), list);
settings.setValue(QString::fromUtf8("Preferences/Downloads/DownloadInScanDirs"), misc::toStringList(list));
}
static bool isTorrentExportEnabled() {