mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 19:57:45 +03:00
Fix download in scan dir persistence
This commit is contained in:
parent
9543bd63f9
commit
72f4c81f4c
1 changed files with 3 additions and 2 deletions
|
@ -37,6 +37,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include "qinisettings.h"
|
#include "qinisettings.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const int PathColumn = 0;
|
const int PathColumn = 0;
|
||||||
|
@ -190,13 +191,13 @@ int ScanFoldersModel::findPathData(const QString &path) const {
|
||||||
|
|
||||||
void ScanFoldersModel::makePersistent(QIniSettings &settings) {
|
void ScanFoldersModel::makePersistent(QIniSettings &settings) {
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
QList<QVariant> downloadInFolderInfo;
|
QList<bool> downloadInFolderInfo;
|
||||||
foreach (const PathData* pathData, m_pathList) {
|
foreach (const PathData* pathData, m_pathList) {
|
||||||
paths << pathData->path;
|
paths << pathData->path;
|
||||||
downloadInFolderInfo << pathData->downloadAtPath;
|
downloadInFolderInfo << pathData->downloadAtPath;
|
||||||
}
|
}
|
||||||
settings.setValue(QString::fromUtf8("ScanDirs"), paths);
|
settings.setValue(QString::fromUtf8("ScanDirs"), paths);
|
||||||
settings.setValue(QString::fromUtf8("DownloadInScanDirs"), downloadInFolderInfo);
|
settings.setValue(QString::fromUtf8("DownloadInScanDirs"), misc::toStringList(downloadInFolderInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
ScanFoldersModel *ScanFoldersModel::m_instance = 0;
|
ScanFoldersModel *ScanFoldersModel::m_instance = 0;
|
||||||
|
|
Loading…
Reference in a new issue