Browse Source

Merge pull request #426 from sledgehammer999/fix_dont_show

Fix 'dont show' dialog when downloading torrent. Closes issue #405.
adaptive-webui-19844
Christophe Dumez 12 years ago
parent
commit
13a195d73b
  1. 13
      src/mainwindow.cpp

13
src/mainwindow.cpp

@ -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);

Loading…
Cancel
Save