mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Fix scan directories saving (closes #694768)
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "scannedfoldersmodel.h"
|
||||
|
||||
#include "preferences.h"
|
||||
#include "filesystemwatcher.h"
|
||||
|
||||
#include <QDir>
|
||||
@@ -189,15 +189,16 @@ int ScanFoldersModel::findPathData(const QString &path) const {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ScanFoldersModel::makePersistent(QIniSettings &settings) {
|
||||
void ScanFoldersModel::makePersistent() {
|
||||
Preferences pref;
|
||||
QStringList paths;
|
||||
QList<bool> downloadInFolderInfo;
|
||||
foreach (const PathData* pathData, m_pathList) {
|
||||
paths << pathData->path;
|
||||
downloadInFolderInfo << pathData->downloadAtPath;
|
||||
}
|
||||
settings.setValue(QString::fromUtf8("ScanDirs"), paths);
|
||||
settings.setValue(QString::fromUtf8("DownloadInScanDirs"), misc::toStringList(downloadInFolderInfo));
|
||||
pref.setScanDirs(paths);
|
||||
pref.setDownloadInScanDirs(downloadInFolderInfo);
|
||||
}
|
||||
|
||||
ScanFoldersModel *ScanFoldersModel::m_instance = 0;
|
||||
|
||||
Reference in New Issue
Block a user