mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 04:38:04 -06:00
committed by
GitHub
parent
e4313d6651
commit
dcf3e97291
@@ -38,8 +38,7 @@
|
||||
#include "apierror.h"
|
||||
|
||||
APIController::APIController(IApplication *app, QObject *parent)
|
||||
: QObject(parent)
|
||||
, ApplicationComponent(app)
|
||||
: ApplicationComponent(app, parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class QString;
|
||||
using DataMap = QHash<QString, QByteArray>;
|
||||
using StringMap = QHash<QString, QString>;
|
||||
|
||||
class APIController : public QObject, public ApplicationComponent
|
||||
class APIController : public ApplicationComponent<QObject>
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY_MOVE(APIController)
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "base/bittorrent/torrent.h"
|
||||
#include "base/bittorrent/torrentdescriptor.h"
|
||||
#include "base/bittorrent/trackerentry.h"
|
||||
#include "base/interfaces/iapplication.h"
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
@@ -732,7 +733,7 @@ void TorrentsController::addAction()
|
||||
if (!url.isEmpty())
|
||||
{
|
||||
Net::DownloadManager::instance()->setCookiesFromUrl(cookies, QUrl::fromEncoded(url.toUtf8()));
|
||||
partialSuccess |= BitTorrent::Session::instance()->addTorrent(url, addTorrentParams);
|
||||
partialSuccess |= app()->addTorrentManager()->addTorrent(url, addTorrentParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user