mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Importance code refactoring related to the "preferences" code - Greatly improves performance
This commit is contained in:
parent
a640b08414
commit
e5032a52c4
26 changed files with 976 additions and 1142 deletions
|
@ -42,7 +42,7 @@ using namespace libtorrent;
|
|||
QTracker::QTracker(QObject *parent) :
|
||||
QTcpServer(parent)
|
||||
{
|
||||
Q_ASSERT(Preferences::isTrackerEnabled());
|
||||
Q_ASSERT(Preferences().isTrackerEnabled());
|
||||
connect(this, SIGNAL(newConnection()), this, SLOT(handlePeerConnection()));
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void QTracker::handlePeerConnection()
|
|||
|
||||
bool QTracker::start()
|
||||
{
|
||||
const int listen_port = Preferences::getTrackerPort();
|
||||
const int listen_port = Preferences().getTrackerPort();
|
||||
//
|
||||
if(isListening()) {
|
||||
if(serverPort() == listen_port) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue