|
|
@ -308,6 +308,7 @@ options_imp::~options_imp() |
|
|
|
qDebug("-> destructing Options"); |
|
|
|
qDebug("-> destructing Options"); |
|
|
|
foreach (const QString &path, addedScanDirs) |
|
|
|
foreach (const QString &path, addedScanDirs) |
|
|
|
ScanFoldersModel::instance()->removePath(path); |
|
|
|
ScanFoldersModel::instance()->removePath(path); |
|
|
|
|
|
|
|
ScanFoldersModel::instance()->configure(); // reloads "removed" paths
|
|
|
|
delete scrollArea_advanced->layout(); |
|
|
|
delete scrollArea_advanced->layout(); |
|
|
|
delete advancedSettings; |
|
|
|
delete advancedSettings; |
|
|
|
} |
|
|
|
} |
|
|
@ -418,8 +419,10 @@ void options_imp::saveOptions() |
|
|
|
pref->useAdditionDialog(useAdditionDialog()); |
|
|
|
pref->useAdditionDialog(useAdditionDialog()); |
|
|
|
pref->additionDialogFront(checkAdditionDialogFront->isChecked()); |
|
|
|
pref->additionDialogFront(checkAdditionDialogFront->isChecked()); |
|
|
|
pref->addTorrentsInPause(addTorrentsInPause()); |
|
|
|
pref->addTorrentsInPause(addTorrentsInPause()); |
|
|
|
|
|
|
|
ScanFoldersModel::instance()->removeFromFSWatcher(removedScanDirs); |
|
|
|
ScanFoldersModel::instance()->addToFSWatcher(addedScanDirs); |
|
|
|
ScanFoldersModel::instance()->addToFSWatcher(addedScanDirs); |
|
|
|
ScanFoldersModel::instance()->makePersistent(); |
|
|
|
ScanFoldersModel::instance()->makePersistent(); |
|
|
|
|
|
|
|
removedScanDirs.clear(); |
|
|
|
addedScanDirs.clear(); |
|
|
|
addedScanDirs.clear(); |
|
|
|
pref->setTorrentExportDir(getTorrentExportDir()); |
|
|
|
pref->setTorrentExportDir(getTorrentExportDir()); |
|
|
|
pref->setFinishedTorrentExportDir(getFinishedTorrentExportDir()); |
|
|
|
pref->setFinishedTorrentExportDir(getFinishedTorrentExportDir()); |
|
|
@ -1236,7 +1239,11 @@ void options_imp::on_removeScanFolderButton_clicked() |
|
|
|
if (selected.isEmpty()) |
|
|
|
if (selected.isEmpty()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
Q_ASSERT(selected.count() == ScanFoldersModel::instance()->columnCount()); |
|
|
|
Q_ASSERT(selected.count() == ScanFoldersModel::instance()->columnCount()); |
|
|
|
ScanFoldersModel::instance()->removePath(selected.first().row()); |
|
|
|
foreach (const QModelIndex &index, selected) { |
|
|
|
|
|
|
|
if (index.column() == ScanFoldersModel::WATCH) |
|
|
|
|
|
|
|
removedScanDirs << index.data().toString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ScanFoldersModel::instance()->removePath(selected.first().row(), false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void options_imp::handleScanFolderViewSelectionChanged() |
|
|
|
void options_imp::handleScanFolderViewSelectionChanged() |
|
|
|