Skip to content

Commit e6985b9

Browse files
committed
feat: dconfig2cpp always add bindableFoo functions on Qt6
Direct string literal for the property name, because the literal was use on the Q_PROPERTY macro, so use the hex encode for the property name strings can't avoid the Chinese text codec problems.
1 parent 5a85299 commit e6985b9

File tree

3 files changed

+106
-85
lines changed

3 files changed

+106
-85
lines changed

cmake/DtkTools/DtkDConfigMacros.cmake

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function(dtk_add_config_to_cpp OUTPUT_VAR JSON_FILE)
1313
cmake_parse_arguments(
1414
"arg"
1515
""
16-
"OUTPUT_FILE_NAME;CLASS_NAME;USE_QPROPERTY"
16+
"OUTPUT_FILE_NAME;CLASS_NAME"
1717
""
1818
${ARGN}
1919
)
@@ -33,22 +33,10 @@ function(dtk_add_config_to_cpp OUTPUT_VAR JSON_FILE)
3333
set(CLASS_NAME_ARG "")
3434
endif()
3535

36-
if(NOT DEFINED arg_USE_QPROPERTY)
37-
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
38-
set(arg_USE_QPROPERTY ON)
39-
endif()
40-
endif()
41-
42-
if (arg_USE_QPROPERTY)
43-
set(USE_QPROPERTY_ARG "--use-qproperty")
44-
else()
45-
set(USE_QPROPERTY_ARG "")
46-
endif()
47-
4836
# Add a custom command to run dconfig2cpp
4937
add_custom_command(
5038
OUTPUT ${OUTPUT_HEADER}
51-
COMMAND ${DTK_DCONFIG2CPP} -o ${OUTPUT_HEADER} ${CLASS_NAME_ARG} ${USE_QPROPERTY_ARG} ${JSON_FILE}
39+
COMMAND ${DTK_DCONFIG2CPP} -o ${OUTPUT_HEADER} ${CLASS_NAME_ARG} ${JSON_FILE}
5240
DEPENDS ${JSON_FILE} ${DTK_XML2CPP}
5341
COMMENT "Generating ${OUTPUT_HEADER} from ${JSON_FILE}"
5442
VERBATIM

0 commit comments

Comments
 (0)