mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix scan directories saving (closes #694768)
This commit is contained in:
parent
f772e28bf9
commit
be32669baf
4 changed files with 9 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue