mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,8 +143,7 @@ namespace
|
||||
}
|
||||
|
||||
WebApplication::WebApplication(IApplication *app, QObject *parent)
|
||||
: QObject(parent)
|
||||
, ApplicationComponent(app)
|
||||
: ApplicationComponent(app, parent)
|
||||
, m_cacheID {QString::number(Utils::Random::rand(), 36)}
|
||||
, m_authController {new AuthController(this, app, this)}
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ class APIController;
|
||||
class AuthController;
|
||||
class WebApplication;
|
||||
|
||||
class WebSession final : public QObject, public ApplicationComponent, public ISession
|
||||
class WebSession final : public ApplicationComponent<QObject>, public ISession
|
||||
{
|
||||
public:
|
||||
explicit WebSession(const QString &sid, IApplication *app);
|
||||
@@ -83,8 +83,7 @@ private:
|
||||
QMap<QString, APIController *> m_apiControllers;
|
||||
};
|
||||
|
||||
class WebApplication final
|
||||
: public QObject, public ApplicationComponent
|
||||
class WebApplication final : public ApplicationComponent<QObject>
|
||||
, public Http::IRequestHandler, public ISessionManager
|
||||
, private Http::ResponseBuilder
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Net
|
||||
|
||||
class WebApplication;
|
||||
|
||||
class WebUI : public QObject, public ApplicationComponent
|
||||
class WebUI final : public ApplicationComponent<QObject>
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY_MOVE(WebUI)
|
||||
|
||||
Reference in New Issue
Block a user