1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-03-10 12:21:12 +00:00

Merge pull request #426 from sledgehammer999/fix_dont_show

Fix 'dont show' dialog when downloading torrent. Closes issue #405.
This commit is contained in:
Christophe Dumez 2013-02-16 05:33:00 -08:00
commit 13a195d73b

View File

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