Browse Source

explicitly inserting Qstring cause of compiler errors

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
a8a7a1582f
  1. 12
      libqethereum/QEthereum.cpp

12
libqethereum/QEthereum.cpp

@ -44,8 +44,8 @@ void QWebThree::poll()
for (int w: m_watches) for (int w: m_watches)
{ {
QJsonObject res; QJsonObject res;
res["jsonrpc"] = "2.0"; res["jsonrpc"] = QString::fromStdString("2.0");
res["method"] = "changed"; res["method"] = QString::fromStdString("changed");
QJsonArray params; QJsonArray params;
params.append(w); params.append(w);
@ -66,8 +66,8 @@ void QWebThree::clearWatches()
for (int w: m_watches) for (int w: m_watches)
{ {
QJsonObject res; QJsonObject res;
res["jsonrpc"] = "2.0"; res["jsonrpc"] = QString::fromStdString("2.0");
res["method"] = "uninstallFilter"; res["method"] = QString::fromStdString("uninstallFilter");
QJsonArray params; QJsonArray params;
params.append(w); params.append(w);
@ -89,7 +89,7 @@ void QWebThree::clientDieing()
static QString formatInput(QJsonObject const& _object) static QString formatInput(QJsonObject const& _object)
{ {
QJsonObject res; QJsonObject res;
res["jsonrpc"] = "2.0"; res["jsonrpc"] = QString::fromStdString("2.0");
res["method"] = _object["call"]; res["method"] = _object["call"];
res["params"] = _object["args"]; res["params"] = _object["args"];
res["id"] = _object["_id"]; res["id"] = _object["_id"];
@ -135,7 +135,7 @@ void QWebThree::onDataProcessed(QString _json, QString _addInfo)
if (elem.contains("result") && elem["result"].toBool() == true) if (elem.contains("result") && elem["result"].toBool() == true)
{ {
QJsonObject res; QJsonObject res;
res["_event"] = "messages"; res["_event"] = QString::fromStdString("messages");
res["data"] = (int)m_watches[i]; // we can do that couse poll is synchronous res["data"] = (int)m_watches[i]; // we can do that couse poll is synchronous
response(QString::fromUtf8(QJsonDocument(res).toJson())); response(QString::fromUtf8(QJsonDocument(res).toJson()));
} }

Loading…
Cancel
Save