mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Fix 'dont show' dialog when downloading torrent. Closes issue #405.
This commit is contained in:
parent
d9d63141bb
commit
fe98c36abf
@ -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…
x
Reference in New Issue
Block a user