Fix 'dont show' dialog when downloading torrent. Closes issue #405.

This commit is contained in:
sledgehammer999 2013-02-11 23:38:33 +02:00
parent d9d63141bb
commit fe98c36abf

View File

@ -994,19 +994,16 @@ void MainWindow::addTorrent(QString path) {
}
void MainWindow::processDownloadedFiles(QString path, QString url) {
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
if (useTorrentAdditionDialog)
Preferences pref;
if (pref.useAdditionDialog())
AddNewTorrentDialog::showTorrent(path, url);
else
QBtSession::instance()->addTorrent(path, false, url);
}
void MainWindow::processNewMagnetLink(const QString& link)
{
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
if (useTorrentAdditionDialog)
void MainWindow::processNewMagnetLink(const QString& link) {
Preferences pref;
if (pref.useAdditionDialog())
AddNewTorrentDialog::showMagnet(link);
else
QBtSession::instance()->addMagnetUri(link);