|
@@ -317,7 +317,7 @@ const char *Templates::ClientMethodDefinitionQmlTemplate = "\nvoid $classname$::
|
|
|
" return;\n"
|
|
|
" }\n\n"
|
|
|
" if (arg == nullptr) {\n"
|
|
|
- " qProtoWarning() << \"Invalid argument provided for method $classname$::$method_name$, argument of type 'qtprotobufnamespace::tests::SimpleStringMessage *' expected\";\n"
|
|
|
+ " qProtoWarning() << \"Invalid argument provided for method $classname$::$method_name$, argument of type '$param_type$ *' expected\";\n"
|
|
|
" return;\n"
|
|
|
" }\n\n"
|
|
|
" QJSEngine *jsEngine = qjsEngine(this);\n"
|
|
@@ -327,7 +327,7 @@ const char *Templates::ClientMethodDefinitionQmlTemplate = "\nvoid $classname$::
|
|
|
" }\n\n"
|
|
|
" QtProtobuf::QGrpcAsyncReply *reply = call(\"$method_name$\", *$param_name$);\n"
|
|
|
" reply->subscribe(jsEngine, [this, reply, callback, jsEngine]() {\n"
|
|
|
- " auto result = new $param_type$(reply->read<$param_type$>());\n"
|
|
|
+ " auto result = new $return_type$(reply->read<$return_type$>());\n"
|
|
|
" qmlEngine(this)->setObjectOwnership(result, QQmlEngine::JavaScriptOwnership);\n"
|
|
|
" QJSValue(callback).call(QJSValueList{jsEngine->toScriptValue(result)});\n"
|
|
|
" }, [errorCallback, jsEngine](const QGrpcStatus &status) {\n"
|