mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Migrate everything to use the new Preferences class and not access directly the qbittorrent.ini file.
This commit is contained in:
@@ -42,12 +42,14 @@
|
||||
#include "qtracker.h"
|
||||
#include "preferences.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
QTracker::QTracker(QObject *parent) :
|
||||
QTcpServer(parent)
|
||||
{
|
||||
Q_ASSERT(Preferences().isTrackerEnabled());
|
||||
Q_ASSERT(Preferences::instance()->isTrackerEnabled());
|
||||
connect(this, SIGNAL(newConnection()), this, SLOT(handlePeerConnection()));
|
||||
}
|
||||
|
||||
@@ -71,7 +73,7 @@ void QTracker::handlePeerConnection()
|
||||
|
||||
bool QTracker::start()
|
||||
{
|
||||
const int listen_port = Preferences().getTrackerPort();
|
||||
const int listen_port = Preferences::instance()->getTrackerPort();
|
||||
//
|
||||
if (isListening()) {
|
||||
if (serverPort() == listen_port) {
|
||||
|
||||
Reference in New Issue
Block a user