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/.
*/
#include <QFormLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QStatusBar>

View File

@ -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 <QNetworkReply>
#include <QNetworkRequest>
#include <QUrl>
@ -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() {