From c424dec7d4c3c721405fa48b4a57e5bc5cb5d71a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 28 Sep 2017 10:54:27 +0200 Subject: [PATCH] OAuth: fix compilation with old gcc We need to used QPointer::data in the signal slot connection Relates to pr #6065 --- src/gui/creds/oauth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/creds/oauth.cpp b/src/gui/creds/oauth.cpp index f06fe3a3c..85a13f4c1 100644 --- a/src/gui/creds/oauth.cpp +++ b/src/gui/creds/oauth.cpp @@ -65,8 +65,8 @@ void OAuth::start() QObject::connect(&_server, &QTcpServer::newConnection, this, [this] { while (QPointer 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 -- 2.30.2