mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Clazy: Add second batch of SIGNAL/SLOT removal
This commit is contained in:
@ -32,10 +32,10 @@ HttpConnectionHandler::HttpConnectionHandler(const QSettings *settings, HttpRequ
|
||||
socket->moveToThread(thread);
|
||||
|
||||
// Connect signals
|
||||
connect(socket, SIGNAL(readyRead()), SLOT(read()));
|
||||
connect(socket, SIGNAL(disconnected()), SLOT(disconnected()));
|
||||
connect(&readTimer, SIGNAL(timeout()), SLOT(readTimeout()));
|
||||
connect(thread, SIGNAL(finished()), this, SLOT(thread_done()));
|
||||
connect(socket, &QIODevice::readyRead, this, &HttpConnectionHandler::read);
|
||||
connect(socket, &QAbstractSocket::disconnected, this, &HttpConnectionHandler::disconnected);
|
||||
connect(&readTimer, &QTimer::timeout, this, &HttpConnectionHandler::readTimeout);
|
||||
connect(thread, &QThread::finished, this, &HttpConnectionHandler::thread_done);
|
||||
|
||||
qDebug("HttpConnectionHandler (%p): constructed", static_cast<void*>(this));
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ HttpConnectionHandlerPool::HttpConnectionHandlerPool(const QSettings *settings,
|
||||
this->sslConfiguration=NULL;
|
||||
loadSslConfig();
|
||||
cleanupTimer.start(settings->value("cleanupInterval",1000).toInt());
|
||||
connect(&cleanupTimer, SIGNAL(timeout()), SLOT(cleanup()));
|
||||
connect(&cleanupTimer, &QTimer::timeout, this, &HttpConnectionHandlerPool::cleanup);
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,7 +83,7 @@ void HttpListener::incomingConnection(tSocketDescriptor socketDescriptor) {
|
||||
qDebug("HttpListener: Too many incoming connections");
|
||||
QTcpSocket* socket=new QTcpSocket(this);
|
||||
socket->setSocketDescriptor(socketDescriptor);
|
||||
connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater()));
|
||||
connect(socket, &QAbstractSocket::disconnected, socket, &QObject::deleteLater);
|
||||
socket->write("HTTP/1.1 503 too many connections\r\nConnection: close\r\n\r\nToo many connections\r\n");
|
||||
socket->disconnectFromHost();
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ HttpSessionStore::HttpSessionStore(const QSettings *settings, QObject* parent)
|
||||
:QObject(parent)
|
||||
{
|
||||
this->settings=settings;
|
||||
connect(&cleanupTimer,SIGNAL(timeout()),this,SLOT(sessionTimerEvent()));
|
||||
connect(&cleanupTimer,&QTimer::timeout,this,&HttpSessionStore::sessionTimerEvent);
|
||||
cleanupTimer.start(60000);
|
||||
cookieName=settings->value("cookieName","sessionid").toByteArray();
|
||||
expirationTime=settings->value("expirationTime",3600000).toInt();
|
||||
|
Reference in New Issue
Block a user