mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-29 16:04:21 +00:00
Rename class variables
This commit is contained in:
parent
35ab86d32f
commit
05d8c46bb0
@ -64,13 +64,13 @@ void WebUI::init()
|
||||
}
|
||||
|
||||
// http server
|
||||
if (!httpServer_) {
|
||||
webapp_ = new WebApplication(this);
|
||||
httpServer_ = new Http::Server(webapp_, this);
|
||||
if (!m_httpServer) {
|
||||
m_webapp = new WebApplication(this);
|
||||
m_httpServer = new Http::Server(m_webapp, this);
|
||||
}
|
||||
else {
|
||||
if (httpServer_->serverPort() != m_port)
|
||||
httpServer_->close();
|
||||
if (m_httpServer->serverPort() != m_port)
|
||||
m_httpServer->close();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
@ -84,17 +84,17 @@ void WebUI::init()
|
||||
const bool areCertsValid = !certs.empty() && std::all_of(certs.begin(), certs.end(), [](QSslCertificate c) { return !c.isNull(); });
|
||||
|
||||
if (!key.isNull() && areCertsValid)
|
||||
httpServer_->enableHttps(certs, key);
|
||||
m_httpServer->enableHttps(certs, key);
|
||||
else
|
||||
httpServer_->disableHttps();
|
||||
m_httpServer->disableHttps();
|
||||
}
|
||||
else {
|
||||
httpServer_->disableHttps();
|
||||
m_httpServer->disableHttps();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!httpServer_->isListening()) {
|
||||
bool success = httpServer_->listen(QHostAddress::Any, m_port);
|
||||
if (!m_httpServer->isListening()) {
|
||||
bool success = m_httpServer->listen(QHostAddress::Any, m_port);
|
||||
if (success)
|
||||
logger->addMessage(tr("Web UI: Now listening on port %1").arg(m_port));
|
||||
else
|
||||
@ -103,26 +103,26 @@ void WebUI::init()
|
||||
|
||||
// DynDNS
|
||||
if (pref->isDynDNSEnabled()) {
|
||||
if (!dynDNSUpdater_)
|
||||
dynDNSUpdater_ = new Net::DNSUpdater(this);
|
||||
if (!m_dnsUpdater)
|
||||
m_dnsUpdater = new Net::DNSUpdater(this);
|
||||
else
|
||||
dynDNSUpdater_->updateCredentials();
|
||||
m_dnsUpdater->updateCredentials();
|
||||
}
|
||||
else {
|
||||
if (dynDNSUpdater_)
|
||||
delete dynDNSUpdater_;
|
||||
if (m_dnsUpdater)
|
||||
delete m_dnsUpdater;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Net::PortForwarder::instance()->deletePort(oldPort);
|
||||
|
||||
if (httpServer_)
|
||||
delete httpServer_;
|
||||
if (m_httpServer)
|
||||
delete m_httpServer;
|
||||
|
||||
if (webapp_)
|
||||
delete webapp_;
|
||||
if (m_webapp)
|
||||
delete m_webapp;
|
||||
|
||||
if (dynDNSUpdater_)
|
||||
delete dynDNSUpdater_;
|
||||
if (m_dnsUpdater)
|
||||
delete m_dnsUpdater;
|
||||
}
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ private slots:
|
||||
void init();
|
||||
|
||||
private:
|
||||
QPointer<Http::Server> httpServer_;
|
||||
QPointer<Net::DNSUpdater> dynDNSUpdater_;
|
||||
QPointer<AbstractWebApplication> webapp_;
|
||||
QPointer<Http::Server> m_httpServer;
|
||||
QPointer<Net::DNSUpdater> m_dnsUpdater;
|
||||
QPointer<AbstractWebApplication> m_webapp;
|
||||
quint16 m_port;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user