Add option to automatically remove .torrent files upon adding

Some browsers do not download files, intended for immediate opening,
into a temporary directory, and thus a regular download directories
accumulate those unneeded files.

The option allows qBittorrent to clean after itself and delete those
files whether they were succesfully added or not (user-selectable
policy).
This commit is contained in:
Eugene Shalygin
2016-04-07 16:58:30 +02:00
parent 35c51ad3b1
commit 6e73fa80b8
10 changed files with 391 additions and 49 deletions

View File

@@ -31,8 +31,9 @@
#ifndef ADDNEWTORRENTDIALOG_H
#define ADDNEWTORRENTDIALOG_H
#include <QShortcut>
#include <QDialog>
#include <QScopedPointer>
#include <QShortcut>
#include <QUrl>
#include "base/bittorrent/infohash.h"
@@ -49,6 +50,7 @@ namespace Ui
}
class TorrentContentFilterModel;
class TorrentFileGuard;
class PropListDelegate;
class AddNewTorrentDialog: public QDialog
@@ -79,6 +81,7 @@ private slots:
void handleDownloadFinished(const QString &url, const QString &filePath);
void savingModeChanged(bool enabled);
void categoryChanged(int index);
void doNotDeleteTorrentClicked(bool checked);
void accept() override;
void reject() override;
@@ -109,6 +112,7 @@ private:
QShortcut *editHotkey;
QByteArray m_headerState;
int m_oldIndex;
QScopedPointer<TorrentFileGuard> m_torrentGuard;
};
#endif // ADDNEWTORRENTDIALOG_H