mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 08:32:31 -06:00
Fix compilation errors due to recent merge from master
This commit is contained in:
@@ -997,9 +997,10 @@ void MainWindow::processNewMagnetLink(const QString& link)
|
|||||||
{
|
{
|
||||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||||
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||||
if (useTorrentAdditionDialog)
|
if (useTorrentAdditionDialog) {
|
||||||
AddNewTorrentDialog::showMagnet(link);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
else
|
dialog->showLoadMagnetURI(link);
|
||||||
|
} else
|
||||||
QBtSession::instance()->addMagnetUri(link);
|
QBtSession::instance()->addMagnetUri(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,11 +327,7 @@ void RSSImp::downloadTorrent() {
|
|||||||
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
||||||
->getItem(item->data(Article::IdRole).toString());
|
->getItem(item->data(Article::IdRole).toString());
|
||||||
|
|
||||||
QString torrentLink;
|
QString torrentLink = article.hasAttachment() ? article.torrentUrl() : article.link();
|
||||||
if (article->hasAttachment())
|
|
||||||
torrentLink = article->torrentUrl();
|
|
||||||
else
|
|
||||||
torrentLink = article->link();
|
|
||||||
|
|
||||||
// Check if it is a magnet link
|
// Check if it is a magnet link
|
||||||
if (torrentLink.startsWith("magnet:", Qt::CaseInsensitive))
|
if (torrentLink.startsWith("magnet:", Qt::CaseInsensitive))
|
||||||
|
|||||||
Reference in New Issue
Block a user