mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
Improvement to last fix
This commit is contained in:
parent
62165445fe
commit
95d8eb9714
1 changed files with 2 additions and 3 deletions
|
@ -46,6 +46,7 @@ namespace {
|
||||||
class ScanFoldersModel::PathData {
|
class ScanFoldersModel::PathData {
|
||||||
public:
|
public:
|
||||||
PathData(const QString &path) : path(path), downloadAtPath(false) {}
|
PathData(const QString &path) : path(path), downloadAtPath(false) {}
|
||||||
|
PathData(const QString &path, bool download_at_path) : path(path), downloadAtPath(download_at_path) {}
|
||||||
const QString path;
|
const QString path;
|
||||||
bool downloadAtPath;
|
bool downloadAtPath;
|
||||||
};
|
};
|
||||||
|
@ -124,10 +125,8 @@ ScanFoldersModel::PathStatus ScanFoldersModel::addPath(const QString &path, bool
|
||||||
connect(m_fsWatcher, SIGNAL(torrentsAdded(QStringList&)), this, SIGNAL(torrentsAdded(QStringList&)));
|
connect(m_fsWatcher, SIGNAL(torrentsAdded(QStringList&)), this, SIGNAL(torrentsAdded(QStringList&)));
|
||||||
}
|
}
|
||||||
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||||
m_pathList << new PathData(canonicalPath);
|
m_pathList << new PathData(canonicalPath, download_at_path);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
// Set download at path
|
|
||||||
setDownloadAtPath(m_pathList.size()-1, download_at_path);
|
|
||||||
// Start scanning
|
// Start scanning
|
||||||
m_fsWatcher->addPath(canonicalPath);
|
m_fsWatcher->addPath(canonicalPath);
|
||||||
return Ok;
|
return Ok;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue