mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-09 07:40:19 +08: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) {
|
||||
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…
Reference in New Issue
Block a user