From 4177a37d63cae8b53dc65f4a268233ad6fd8f8f5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 24 Jun 2012 10:44:52 +0300 Subject: [PATCH] Fix compilation errors due to recent merge from master --- src/mainwindow.cpp | 7 ++++--- src/rss/rss_imp.cpp | 6 +----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c86f96883..6d00fe426 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -997,9 +997,10 @@ 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 + if (useTorrentAdditionDialog) { + torrentAdditionDialog *dialog = new torrentAdditionDialog(this); + dialog->showLoadMagnetURI(link); + } else QBtSession::instance()->addMagnetUri(link); } diff --git a/src/rss/rss_imp.cpp b/src/rss/rss_imp.cpp index 51c4f8b65..c340ac4aa 100644 --- a/src/rss/rss_imp.cpp +++ b/src/rss/rss_imp.cpp @@ -327,11 +327,7 @@ void RSSImp::downloadTorrent() { const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString()) ->getItem(item->data(Article::IdRole).toString()); - QString torrentLink; - if (article->hasAttachment()) - torrentLink = article->torrentUrl(); - else - torrentLink = article->link(); + QString torrentLink = article.hasAttachment() ? article.torrentUrl() : article.link(); // Check if it is a magnet link if (torrentLink.startsWith("magnet:", Qt::CaseInsensitive))