From: Olivier Goffart Date: Thu, 28 Sep 2017 08:54:27 +0000 (+0200) Subject: OAuth: fix compilation with old gcc X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~701^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c424dec7d4c3c721405fa48b4a57e5bc5cb5d71a;p=nextcloud-desktop.git OAuth: fix compilation with old gcc We need to used QPointer::data in the signal slot connection Relates to pr #6065 --- 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