Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.0
-
None
Description
I am using Qts remote object compiler (repc) to generate some c++ replica headers from some auto-generated moc json output.
The issue is repc seems to be hard coded to only include a selection of headers in its output (see https://github.com/qt/qtremoteobjects/blob/37c34645fc8d80717f1ea6b9ec7fddcfeef44f79/tools/repc/repcodegenerator.cpp#L230)
This is fine so long as I make sure my classes only contain simple c++ value types however if the class contains a slot that takes a QUrl, QSize, etc then type will be undefined in the header file generated by repc. I can work around this by including these types before I include any of these repc generated replica headers but I feel like at least the comment Qt types should be supported.
At the very least a way to inject code into the headers generated by repc may allow people to work around the issue. I noticed that repc has a -I cli argument which looked potential but from looking at the sources it appears that it is not hooked up to anything.
Steps to reproduce:
1. moc.exe InputHeader.hpp --output-json -o InputHeader.json
2. repc.exe InputHeader.json -o replica InputHeaderReplica.hpp
3 #include "InputHeaderReplica.hpp" // <- see undefined types if InputHeader.hpp used anything beyond the built in c++ types.
See the attached Renderer.hpp, Renderer.json and RendererReplica.hpp for an examples for the above steps as I see them.