QtNetwork: code tidies: use the 4-arg connect overload

The 3-arg connect is error-prone and makes the lifetime of the
connection unclear.

Amends dae24df07f

Change-Id: Iec1c2cb266fcaca1a1c407a6158cc8bbb282756b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2023-06-24 12:36:50 +02:00
parent d0a5866f6f
commit d45ac7b898

View File

@ -341,7 +341,7 @@ void QSslServerPrivate::initializeHandshakeProcess(QSslSocket *socket)
});
auto it = socketData.emplace(quintptr(socket), readyRead, destroyed, std::make_shared<QTimer>());
it->timeoutTimer->setSingleShot(true);
it->timeoutTimer->callOnTimeout([this, socket]() { handleHandshakeTimedOut(socket); });
it->timeoutTimer->callOnTimeout(q, [this, socket]() { handleHandshakeTimedOut(socket); });
it->timeoutTimer->setInterval(handshakeTimeout);
it->timeoutTimer->start();
}