From 452380e274635afbb38e81e45761f24e2b0f136f Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 3 Oct 2021 14:13:04 +0200 Subject: [PATCH] Don't parent connections to controller/Login. This prevents a crash upon destruction for newer libquotient versions --- src/controller.cpp | 4 ++-- src/login.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 623e4a428..a6b6a0057 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -144,7 +144,7 @@ void Controller::loginWithAccessToken(const QString &serverAddr, const QString & QUrl serverUrl(serverAddr); - auto conn = new Connection(this); + auto conn = new Connection(); if (serverUrl.isValid()) { conn->setHomeserver(serverUrl); } @@ -260,7 +260,7 @@ void Controller::invokeLogin() if (!account.homeserver().isEmpty()) { auto accessToken = loadAccessTokenFromKeyChain(account); - auto connection = new Connection(account.homeserver(), this); + auto connection = new Connection(account.homeserver()); connect(connection, &Connection::connected, this, [=] { connection->loadState(); addConnection(connection); diff --git a/src/login.cpp b/src/login.cpp index f22f8e126..1a31e4978 100644 --- a/src/login.cpp +++ b/src/login.cpp @@ -36,7 +36,7 @@ void Login::init() m_testing = true; Q_EMIT testingChanged(); if (!m_connection) { - m_connection = new Connection(this); + m_connection = new Connection(); } m_connection->resolveServer(m_matrixId); connect(m_connection, &Connection::loginFlowsChanged, this, [=]() {