diff --git a/src/libtomahawk/utils/ItunesParser.cpp b/src/libtomahawk/utils/ItunesParser.cpp index 118c807c4..117d6d3c8 100644 --- a/src/libtomahawk/utils/ItunesParser.cpp +++ b/src/libtomahawk/utils/ItunesParser.cpp @@ -23,8 +23,6 @@ #include #include -#include - #include "Query.h" #include "SourceList.h" #include "jobview/JobStatusView.h" @@ -135,13 +133,13 @@ ItunesParser::itunesResponseLookupFinished() 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 Spotify track lookup:" << p.errorString() << "On line" << p.errorLine(); + tLog() << "Failed to parse json from itunes track lookup:" << jsonData; checkTrackFinished(); return; }