Fix OBS general GET reply handling

This commit is contained in:
Gary Talent 2021-08-08 18:55:53 -05:00
parent a6ecc22d78
commit cf7ba2e8f5
2 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include <QFormLayout>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton> #include <QPushButton>
#include <QStatusBar> #include <QStatusBar>

View File

@ -5,6 +5,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include <QNetworkReply> #include <QNetworkReply>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QUrl> #include <QUrl>
@ -40,7 +41,8 @@ void OBSClient::setSlidesVisible(int state) {
void OBSClient::get(QString urlExt) { void OBSClient::get(QString urlExt) {
QUrl url(QString(BaseUrl) + urlExt); QUrl url(QString(BaseUrl) + urlExt);
QNetworkRequest rqst(url); QNetworkRequest rqst(url);
m_nam->get(rqst)->deleteLater(); auto reply = m_nam->get(rqst);
connect(reply, &QIODevice::readyRead, reply, &QObject::deleteLater);
} }
void OBSClient::poll() { void OBSClient::poll() {