mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Remove QJson usage from Servent
This commit is contained in:
@@ -638,7 +638,7 @@ Servent::readyRead()
|
||||
ControlConnection* cc = 0;
|
||||
bool ok;
|
||||
QString key, conntype, nodeid, controlid;
|
||||
QVariantMap m = d_func()->parser.parse( sock.data()->_msg->payload(), &ok ).toMap();
|
||||
QVariantMap m = TomahawkUtils::parseJson( sock.data()->_msg->payload(), &ok ).toMap();
|
||||
if ( !ok )
|
||||
{
|
||||
tDebug() << "Invalid JSON on new connection, aborting";
|
||||
@@ -800,8 +800,7 @@ Servent::createParallelConnection( Connection* orig_conn, Connection* new_conn,
|
||||
m.insert( "offer", key );
|
||||
m.insert( "controlid", Database::instance()->impl()->dbid() );
|
||||
|
||||
QJson::Serializer ser;
|
||||
orig_conn->sendMsg( Msg::factory( ser.serialize(m), Msg::JSON ) );
|
||||
orig_conn->sendMsg( Msg::factory( TomahawkUtils::toJson( m ), Msg::JSON ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,10 +26,6 @@
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/serializer.h>
|
||||
#include <qjson/qobjecthelper.h>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
class ServentPrivate : public QObject
|
||||
@@ -51,7 +47,6 @@ private:
|
||||
QMap< QString, QPointer< Connection > > offers;
|
||||
QMap< QString, QPair< Tomahawk::peerinfo_ptr, QString > > lazyoffers;
|
||||
QStringList connectedNodes;
|
||||
QJson::Parser parser;
|
||||
|
||||
/**
|
||||
* canonical list of authed peers
|
||||
|
Reference in New Issue
Block a user