mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
OAuth: fix compilation with old gcc
We need to used QPointer::data in the signal slot connection Relates to pr #6065
This commit is contained in:
parent
78078b714e
commit
c424dec7d4
1 changed files with 2 additions and 2 deletions
|
@ -65,8 +65,8 @@ void OAuth::start()
|
|||
|
||||
QObject::connect(&_server, &QTcpServer::newConnection, this, [this] {
|
||||
while (QPointer<QTcpSocket> socket = _server.nextPendingConnection()) {
|
||||
QObject::connect(socket, &QTcpSocket::disconnected, socket, &QTcpSocket::deleteLater);
|
||||
QObject::connect(socket, &QIODevice::readyRead, this, [this, socket] {
|
||||
QObject::connect(socket.data(), &QTcpSocket::disconnected, socket.data(), &QTcpSocket::deleteLater);
|
||||
QObject::connect(socket.data(), &QIODevice::readyRead, this, [this, socket] {
|
||||
QByteArray peek = socket->peek(qMin(socket->bytesAvailable(), 4000LL)); //The code should always be within the first 4K
|
||||
if (peek.indexOf('\n') < 0)
|
||||
return; // wait until we find a \n
|
||||
|
|
Loading…
Reference in a new issue