|
|
|
@ -145,6 +145,7 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa
@@ -145,6 +145,7 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa
|
|
|
|
|
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(trackerAuthenticationRequired(QTorrentHandle)), this, SLOT(trackerAuthenticationRequired(QTorrentHandle))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(newMagnetLink(QString)), this, SLOT(processNewMagnetLink(QString))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(alternativeSpeedsModeChanged(bool)), this, SLOT(updateAltSpeedsBtn(bool))); |
|
|
|
|
connect(QBtSession::instance(), SIGNAL(recursiveTorrentDownloadPossible(QTorrentHandle)), this, SLOT(askRecursiveTorrentDownloadConfirmation(QTorrentHandle))); |
|
|
|
@ -979,6 +980,16 @@ void MainWindow::processDownloadedFiles(QString path, QString url) {
@@ -979,6 +980,16 @@ void MainWindow::processDownloadedFiles(QString path, QString url) {
|
|
|
|
|
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) |
|
|
|
|
AddNewTorrentDialog::showMagnet(link); |
|
|
|
|
else |
|
|
|
|
QBtSession::instance()->addMagnetUri(link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MainWindow::optionsSaved() { |
|
|
|
|
loadPreferences(); |
|
|
|
|
} |
|
|
|
|