diff --git a/src/libtomahawk/sip/SipInfo.cpp b/src/libtomahawk/sip/SipInfo.cpp index c9e0034ff..b32fa013f 100644 --- a/src/libtomahawk/sip/SipInfo.cpp +++ b/src/libtomahawk/sip/SipInfo.cpp @@ -20,9 +20,7 @@ #include "SipInfo.h" #include "utils/Logger.h" - -#include -#include +#include "utils/TomahawkUtils.h" #include @@ -202,8 +200,7 @@ SipInfo::toJson() const } // serialize - QJson::Serializer serializer; - QByteArray ba = serializer.serialize( m ); + QByteArray ba = TomahawkUtils::toJson( m ); return QString::fromLatin1( ba ); } @@ -214,9 +211,8 @@ SipInfo::fromJson( QString json ) { SipInfo info; - QJson::Parser parser; bool ok; - QVariant v = parser.parse( json.toLatin1(), &ok ); + QVariant v = TomahawkUtils::parseJson( json.toLatin1(), &ok ); if ( !ok || v.type() != QVariant::Map ) { qDebug() << Q_FUNC_INFO << "Invalid JSON: " << json;