Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.8.0
-
None
Description
Similar to:
https://doc.qt.io/qt-6/qtremoteobjects-repc.html#header-and-footer-directives
#HEADER namespace MyNamespace {
class MyType
;
#FOOTER } // namespace MyNamespace
Not sure if CLASSHEADER is even the correct way to do it. We essentially need a custom Q_CLASSINFO, so we can add Q_CLASSINFO("RegisterEnumClassesUnscoped", "false");.
We currently run a python script that alters the generated headers as a workaround:
# Call script that updates the generated files after qt6_add_repc_merged find_package(Python3 REQUIRED COMPONENTS Interpreter) set(GENERATED_HEADERS_DIR "${CMAKE_BINARY_DIR}/Libs") add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${Python3_EXECUTABLE} ${IBH_TOOLS_DIR}/update_generated_rep_files.py ${GENERATED_HEADERS_DIR} COMMENT "Adding Q_CLASSINFO to generated QRemoteObjectReplica classes")