Fix scan directories saving (closes #694768)

This commit is contained in:
Christophe Dumez 2010-12-27 19:26:21 +00:00
parent f772e28bf9
commit be32669baf
4 changed files with 9 additions and 7 deletions

View file

@ -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;