From cf7ba2e8f52c6a1d944b888ff9729f8180f88e89 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 8 Aug 2021 18:55:53 -0500 Subject: [PATCH] Fix OBS general GET reply handling --- src/mainwindow.cpp | 2 -- src/obsclient.cpp | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 15c9139..9e016ef 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6,9 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include #include -#include #include #include diff --git a/src/obsclient.cpp b/src/obsclient.cpp index c8c9168..e552b31 100644 --- a/src/obsclient.cpp +++ b/src/obsclient.cpp @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #include #include #include @@ -40,7 +41,8 @@ void OBSClient::setSlidesVisible(int state) { void OBSClient::get(QString urlExt) { QUrl url(QString(BaseUrl) + urlExt); QNetworkRequest rqst(url); - m_nam->get(rqst)->deleteLater(); + auto reply = m_nam->get(rqst); + connect(reply, &QIODevice::readyRead, reply, &QObject::deleteLater); } void OBSClient::poll() {