Use auto to avoid duplicating the type name

This commit is contained in:
Luis Ángel San Martín
2019-05-31 20:58:06 +02:00
parent 923ad40057
commit bb334cfd50
55 changed files with 286 additions and 286 deletions

View File

@ -92,7 +92,7 @@ void HttpListener::incomingConnection(tSocketDescriptor socketDescriptor) {
{
// Reject the connection
qDebug("HttpListener: Too many incoming connections");
QTcpSocket* socket=new QTcpSocket(this);
auto* socket=new QTcpSocket(this);
socket->setSocketDescriptor(socketDescriptor);
connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater()));
socket->write("HTTP/1.1 503 too many connections\r\nConnection: close\r\n\r\nToo many connections\r\n");