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() {