diff --git a/src/libtomahawk-playdarapi/Api_v1.cpp b/src/libtomahawk-playdarapi/Api_v1.cpp index e610634e6..8ae81691b 100644 --- a/src/libtomahawk-playdarapi/Api_v1.cpp +++ b/src/libtomahawk-playdarapi/Api_v1.cpp @@ -455,9 +455,10 @@ Api_v1::get_results( QxtWebRequestEvent* event ) void Api_v1::sendJSON( const QVariantMap& m, QxtWebRequestEvent* event ) { - QJson::Serializer ser; QByteArray ctype; - QByteArray body = ser.serialize( m ); + bool ok; + QByteArray body = TomahawkUtils::toJson( m, &ok ); + Q_ASSERT( ok ); if ( urlHasQueryItem( event->url, "jsonp" ) && !urlQueryItemValue( event->url, "jsonp" ).isEmpty() ) { diff --git a/src/libtomahawk-playdarapi/Api_v1.h b/src/libtomahawk-playdarapi/Api_v1.h index 846d9f63e..514fb05ea 100644 --- a/src/libtomahawk-playdarapi/Api_v1.h +++ b/src/libtomahawk-playdarapi/Api_v1.h @@ -31,8 +31,6 @@ #include #include -#include - #include #include #include diff --git a/src/libtomahawk-playdarapi/Api_v1_5.cpp b/src/libtomahawk-playdarapi/Api_v1_5.cpp index 499133329..e73ad4813 100644 --- a/src/libtomahawk-playdarapi/Api_v1_5.cpp +++ b/src/libtomahawk-playdarapi/Api_v1_5.cpp @@ -104,9 +104,8 @@ Api_v1_5::playback( QxtWebRequestEvent* event, const QString& command ) trackInfo.insert( "duration", currentTrack->track()->duration() ); trackInfo.insert( "track", currentTrack->track()->track() ); - QJson::Serializer serializer; bool ok; - json = serializer.serialize( trackInfo, &ok ); + json = TomahawkUtils::toJson( trackInfo, &ok ); Q_ASSERT( ok ); } diff --git a/src/libtomahawk-playdarapi/CMakeLists.txt b/src/libtomahawk-playdarapi/CMakeLists.txt index e6546749c..bf251ab6f 100644 --- a/src/libtomahawk-playdarapi/CMakeLists.txt +++ b/src/libtomahawk-playdarapi/CMakeLists.txt @@ -10,7 +10,7 @@ list(APPEND ${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}_SOURCES list(APPEND ${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}_UI ) -include_directories(${QXTWEB_INCLUDE_DIRS} ${QJSON_INCLUDE_DIR}) +include_directories(${QXTWEB_INCLUDE_DIRS}) tomahawk_add_library(${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET} SOURCES ${${TOMAHAWK_PLAYDARAPI_LIBRARY_TARGET}_SOURCES}