Verified Commit 8eb8a5e9 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix crash when deleting FullAuthenticationJob

Regression introduced in b9fe0d8e, which made QTcpServer a std::unique_ptr,
but forgot to remove a deleteLater() statement few lines below.
parent a7f5e982
Pipeline #93370 canceled with stage
......@@ -192,7 +192,7 @@ void FullAuthenticationJob::start()
scopes << scope.toString();
}
d->mServer = std::make_unique<QTcpServer>(this);
d->mServer = std::make_unique<QTcpServer>();
if (!d->mServer->listen(QHostAddress::LocalHost, d->mServerPort)) {
d->emitError(InvalidAccount, tr("Could not start OAuth HTTP server"));
return;
......@@ -206,7 +206,6 @@ void FullAuthenticationJob::start()
this, [this](QAbstractSocket::SocketError e) { d->socketError(e); });
connect(d->mConnection, &QTcpSocket::readyRead, this, [this]() { d->socketReady(); });
d->mServer->close();
d->mServer->deleteLater();
});
QUrl url(QStringLiteral("https://accounts.google.com/o/oauth2/auth"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment