Is AsyncExample support the client send parameter to the server?
In async-client, i add a QVariant parameter to the pauseAsync signal function as follow
ReturnValue pauseAsync(QVariant param, QObject *obj, const char *slot);
and in async-server, i add a QVariant parameter to the pauseAsync() as follow
ReturnValue pauseAsync();
When i run the example, the client throw a Debug Error:
ASSERT failure in QVariant::save: "Invalid type to save", file kernel\qvariant.cpp, line 2035.
Is AsyncExample support the client send parameter to the server?
This is a super old bug, but I thought I'd reply in case anyone else runs into this issue. QVariant can hold any type, but if you want to save it to disk (or the network), it needs to have QDataStream operators defined, and be registered with the QT Type system (https://doc.qt.io/qt-5/custom-types.html). Here's an example of registering a custom type: https://github.com/brendan0powers/QtRpc2/blob/master/examples/data_client/dataservice.h#L32