aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-04-23 13:31:31 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2021-04-26 09:14:06 +0000
commit3dc9ee1b1bea5b39b2997b214c99f5cc9b827ab7 (patch)
treed218050eea9d7758bc6ef88af25a05dc3afa2322 /sources/pyside6
parent2e90d0f9eebc709fc24ff696eb79689b5393a302 (diff)
doc: fatal error when snippet conversion fails
When the snippets_translate tool fails, the build process continues normally, falling back to use the original C++ snippets. This problem can be dangerous, since we will not notice if something is wrong without checking the full log. This patch make the build process to fail when the tool doesn't exit normally. For builds where the documentation generation is skipped, this change will have no effect. Complementary to this, the patch includes a new Python file to determine if the C++ include have an import counterpart in Python. Fixes: PYSIDE-1527 Pick-to: 6.0.4 Change-Id: I725b623f60dbc540a6e7834502300c39cd22b5a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/doc/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/pyside6/doc/CMakeLists.txt b/sources/pyside6/doc/CMakeLists.txt
index af750bcd0..e822992b1 100644
--- a/sources/pyside6/doc/CMakeLists.txt
+++ b/sources/pyside6/doc/CMakeLists.txt
@@ -38,7 +38,11 @@ if (FULLDOCSBUILD)
# so we use the general SRC directory to copy all the other snippets
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SNIPPETS_TOOL}
--qt ${QT_SRC_DIR}/.. --pyside ${PYSIDE_ROOT} -w ${SNIPPETS_QUIET_OPTION}
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+ ERROR_VARIABLE SNIPPETS_ERROR)
+ if (SNIPPETS_ERROR)
+ message(FATAL_ERROR "The 'snippets_translate' tool failed: ${SNIPPETS_ERROR}")
+ endif()
endif()
# Generate example gallery