mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Use new JSON parser wrapper in ipDetected
This commit is contained in:
@@ -980,9 +980,9 @@ Servent::ipDetected()
|
|||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
QJson::Parser p;
|
|
||||||
bool ok;
|
bool ok;
|
||||||
const QVariantMap res = p.parse( reply, &ok ).toMap();
|
// We are called when the NetworkReply has finished so we should have all data available.
|
||||||
|
const QVariantMap res = TomahawkUtils::parseJson( reply->readAll(), &ok ).toMap();
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
tLog() << Q_FUNC_INFO << "Failed parsing ip-autodetection response";
|
tLog() << Q_FUNC_INFO << "Failed parsing ip-autodetection response";
|
||||||
|
Reference in New Issue
Block a user