It’s been a few days, I'm facing a problem. I want to write two rep files with one POD on each file.
So, I have a file a.rep :
POD A(int id , QString label)
And a b.rep :
POD B(int id, QList<A> aList)
To include the type A on the file b.rep, I tried :
- #include "a.rep"
- #include <a.rep>
- #include A
- #include "rep_a_replica.h" (Work but just on client side)
Finally, I wrote these lines of code on my header b.rep:
#if defined(REP_B_REPLICA_H)
#include "rep_a_replica.h"
#endif
#if defined(REP_B_SOURCE_H)
#include "rep_a_source.h"
#endif
With this lines, the type A is recognized. But when I send by my server a type B, the client cannot read the type A and print on the console :
QSQ_: unable to load type 'A', returning an empty list
So, my question is :
Have you a better method to import the type A ? If not, have you an idea of why I can't read the type A on client side ?
Adding a qMetaTypeId() solve the problem.