From 4e9beb725b04db4690717647d8486b6b492dcc3a Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sat, 12 Apr 2014 13:53:53 +0100 Subject: [PATCH] Remove QJson usage from Grooveshark Parser --- src/libtomahawk/utils/GroovesharkParser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/utils/GroovesharkParser.cpp b/src/libtomahawk/utils/GroovesharkParser.cpp index 11da43879..666f8a378 100644 --- a/src/libtomahawk/utils/GroovesharkParser.cpp +++ b/src/libtomahawk/utils/GroovesharkParser.cpp @@ -29,8 +29,6 @@ #include #include -#include - #include "Query.h" #include "SourceList.h" #include "DropJob.h" @@ -206,13 +204,13 @@ GroovesharkParser::groovesharkLookupFinished() if ( r->reply()->error() == QNetworkReply::NoError ) { - QJson::Parser p; bool ok; - QVariantMap res = p.parse( r->reply(), &ok ).toMap(); + QByteArray jsonData = r->reply()->readAll(); + QVariantMap res = TomahawkUtils::parseJson( jsonData, &ok ).toMap(); if ( !ok ) { - tLog() << "Failed to parse json from Grooveshark browse item:" << p.errorString() << "On line" << p.errorLine(); + tLog() << "Failed to parse json from Grooveshark browse item:" << jsonData; checkTrackFinished(); return; }