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