1
0
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:
Uwe L. Korn
2014-04-13 21:42:59 +01:00
parent ef9a20bcc6
commit 2da5a2f93b
2 changed files with 2 additions and 8 deletions

View File

@@ -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 ) );
}
}

View File

@@ -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