Browse Source

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

adaptive-webui-19844
sledgehammer999 12 years ago
parent
commit
fe98c36abf
  1. 13
      src/mainwindow.cpp

13
src/mainwindow.cpp

@ -994,19 +994,16 @@ void MainWindow::addTorrent(QString path) { @@ -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);

Loading…
Cancel
Save