From 534f29e24623c3fe0e630b4a88beb9552ed09a70 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 3 Feb 2015 23:23:10 +0100 Subject: [PATCH] removed redundant code --- libqwebthree/QWebThree.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libqwebthree/QWebThree.cpp b/libqwebthree/QWebThree.cpp index 804766563..31f2f6b92 100644 --- a/libqwebthree/QWebThree.cpp +++ b/libqwebthree/QWebThree.cpp @@ -41,20 +41,9 @@ void QWebThree::clientDieing() this->disconnect(); } -static QString formatInput(QJsonObject const& _object) -{ - QJsonObject res; - res["jsonrpc"] = QString::fromStdString("2.0"); - res["method"] = _object["call"]; - res["params"] = _object["args"]; - res["id"] = _object["_id"]; - return QString::fromUtf8(QJsonDocument(res).toJson()); -} - QString QWebThree::callMethod(QString _json) { - QJsonObject f = QJsonDocument::fromJson(_json.toUtf8()).object(); - emit processData(formatInput(f), ""); // it's synchronous + emit processData(_json, ""); // it's synchronous return m_response; }