mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
Remove QJson usage from Playdar API
This commit is contained in:
parent
1e2ecc532a
commit
ddf00b5991
@ -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() )
|
||||
{
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <QxtWeb/QxtWebSlotService>
|
||||
#include <QxtWeb/QxtWebPageEvent>
|
||||
|
||||
#include <qjson/serializer.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QSharedPointer>
|
||||
#include <QStringList>
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user