1212#include < QJsonObject>
1313#include < QJsonArray>
1414#include < QMap>
15- #include < QDebug>
1615
1716#include " obs-app.hpp"
1817#include " obs-config.h"
@@ -57,7 +56,7 @@ void FacebookEncoderSettingsProvider::makeRequest(QUrl &url)
5756 " application/json" );
5857
5958 // GET is made async
60- settingsReply_ = restclient_->get (request);
59+ restclient_->get (request);
6160 // This is the callback when data is ready
6261 connect (restclient_, &QNetworkAccessManager::finished, this ,
6362 &FacebookEncoderSettingsProvider::handleResponse);
@@ -66,7 +65,7 @@ void FacebookEncoderSettingsProvider::makeRequest(QUrl &url)
6665QUrlQuery FacebookEncoderSettingsProvider::inputVideoQueryFromCurrentSettings ()
6766{
6867 // Get input settings, shorten name
69- EncoderSettingsRequest *input = currentSettings_.get ();
68+ EncoderSettingsRequest *input = currentSettings_.data ();
7069
7170 QUrlQuery inputVideoSettingsQuery;
7271 inputVideoSettingsQuery.addQueryItem (" video_type" , " live" );
@@ -126,6 +125,10 @@ void addInt(const QJsonObject &json, const char *jsonKey, SettingsMap *map,
126125 if (json[jsonKey].isDouble ()) {
127126 map->insert (mapKey,
128127 QPair (QVariant (json[jsonKey].toInt ()), true ));
128+ } else {
129+ blog (LOG_WARNING,
130+ " FacebookEncoderSettingsProvider could not parse %s to Int" ,
131+ jsonKey);
129132 }
130133}
131134
@@ -140,6 +143,10 @@ void addStringDouble(const QJsonObject &json, const char *jsonKey,
140143 double numberValue = valueString.toDouble (&converted);
141144 if (converted) {
142145 map->insert (mapKey, QPair (QVariant (numberValue), true ));
146+ } else {
147+ blog (LOG_WARNING,
148+ " FacebookEncoderSettingsProvider couldn't parse %s to Double from String" ,
149+ jsonKey);
143150 }
144151}
145152
@@ -149,6 +156,10 @@ void addQString(const QJsonObject &json, const char *jsonKey, SettingsMap *map,
149156 if (json[jsonKey].isString ()) {
150157 map->insert (mapKey,
151158 QPair (QVariant (json[jsonKey].toString ()), true ));
159+ } else {
160+ blog (LOG_WARNING,
161+ " FacebookEncoderSettingsProvider could not parse %s to Strng" ,
162+ jsonKey);
152163 }
153164}
154165
@@ -158,6 +169,10 @@ void addBool(const QJsonObject &json, const char *jsonKey, SettingsMap *map,
158169 if (json[jsonKey].isBool ()) {
159170 map->insert (mapKey,
160171 QPair (QVariant (json[jsonKey].toBool ()), true ));
172+ } else {
173+ blog (LOG_WARNING,
174+ " FacebookEncoderSettingsProvider could not parse %s to Bool" ,
175+ jsonKey);
161176 }
162177}
163178
0 commit comments