File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,25 @@ enable_testing()
1818set (CMAKE_CXX_STANDARD 11)
1919set (CMAKE_CXX_STANDARD_REQUIRED ON )
2020
21+ # Force errors for dangerous operations
22+ add_compile_definitions ( -DQT_NO_CAST_TO_ASCII )
23+
24+ option (PythonQt_NO_IMPLICIT_CASTING "Disable implicit casts related to dangerous implicit conversions" OFF )
25+ if (PythonQt_NO_IMPLICIT_CASTING) # Definitions to force
26+ # errors on dangerous implicit operations
27+ # to be addressed at a later time
28+ add_compile_definitions ( -DQT_NO_CAST_FROM_ASCII
29+ -DQT_NO_CAST_FROM_ASCII
30+ -DQT_NO_CAST_TO_BYTEARRAY
31+ -DQT_NO_CAST_FROM_BYTEARRAY
32+ -DQT_NO_CAST_TO_QSTRING
33+ -DQT_NO_CAST_FROM_QSTRING
34+ -DQT_NO_CAST_TO_QSTRINGREF
35+ -DQT_NO_CAST_FROM_QSTRINGREF
36+ -DQT_NO_CAST_TO_QVARIANT
37+ -DQT_NO_CAST_FROM_QVARIANT )
38+ endif ()
39+
2140option (FORCE_BUILD_QT5 "Force Qt5 build instead of Qt6" OFF )
2241
2342if (FORCE_BUILD_QT5)
You can’t perform that action at this time.
0 commit comments