Clazy: Add second batch of SIGNAL/SLOT removal

This commit is contained in:
Felix Kauselmann
2021-06-03 16:17:07 +02:00
parent f813a018d2
commit ae8e47d863
19 changed files with 80 additions and 80 deletions

View File

@ -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));
}

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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();