mirror of
https://gitlab.com/theadib/JSonRPCPlugin.git
synced 2026-08-29 23:50:27 +08:00
Avoid using 'signals' and 'emit' from Qt to avoid conflicts with other libs (e.g. TBB)
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
|||||||
void listen(unsigned int port);
|
void listen(unsigned int port);
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
JsonRPCResult execute(QString method, QMap<QString, QVariant> params);
|
JsonRPCResult execute(QString method, QMap<QString, QVariant> params);
|
||||||
private slots:
|
private slots:
|
||||||
void onNewConnection();
|
void onNewConnection();
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ void JsonRPCServer::processTextMessage(QString message)
|
|||||||
JsonRPCResult result;
|
JsonRPCResult result;
|
||||||
if(!method.isEmpty() && !obj.value("jsonrpc").toString().isEmpty()) {
|
if(!method.isEmpty() && !obj.value("jsonrpc").toString().isEmpty()) {
|
||||||
// perform the RPC
|
// perform the RPC
|
||||||
result = emit execute(method, params);
|
result = Q_EMIT execute(method, params);
|
||||||
} else {
|
} else {
|
||||||
result = JsonRPCResult::error(-32600, "Invalid Request");
|
result = JsonRPCResult::error(-32600, "Invalid Request");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user