From 1a79ab468d8cc23cfdf28ddfa85d3e03ffddf44c Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Wed, 18 Feb 2026 00:18:33 +0100 Subject: Refactor and document: fix cert filenames, add Doxygen, improve demo Refactoring (issues 1,3,4,5,7,8,9,10 from review): - Replace hardcoded cert filenames with certFile/keyFile properties - Add 30s timeout to certificate trust QEventLoop - Cache servers() QVariantList instead of rebuilding per call - Validate URLs before passing to QtOpcUa - Use ComboBox valueRole for robust enum mapping - Add certificate trust dialog to demo - Remove unnecessary RowLayout wrapper - Remove debug output from BuildDeps.cmake Documentation: - Add Doxygen file blocks to all C++ files - Document AuthMode enum, toAuthenticationInformation(), key Q_INVOKABLE methods, certificateTrustRequested signal contract - Convert section banners to standard format - Add file/target comments to CMake and QML files --- cmake/BuildDeps.cmake | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'cmake') diff --git a/cmake/BuildDeps.cmake b/cmake/BuildDeps.cmake index 8a1fa89..d105419 100644 --- a/cmake/BuildDeps.cmake +++ b/cmake/BuildDeps.cmake @@ -1,3 +1,13 @@ +# ====================================== +# BuildDeps.cmake +# +# Configure, build, and install open62541 and QtOpcUa from +# git submodules under deps/. +# +# Skip detection: if the built .so already exists, the +# corresponding dep is skipped. Delete the file to rebuild. +# ====================================== + set(OPEN62541_SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/open62541") set(OPEN62541_BUILD_DIR "${CMAKE_BINARY_DIR}/deps/open62541-build") set(OPEN62541_INSTALL_DIR "${CMAKE_BINARY_DIR}/deps/open62541-install") @@ -18,7 +28,9 @@ if(NOT EXISTS "${QTOPCUA_SOURCE_DIR}/CMakeLists.txt") ) endif() -# --- open62541 --- +# ====================================== +# open62541 +# ====================================== if(NOT EXISTS "${OPEN62541_INSTALL_DIR}/lib/libopen62541.so") message(STATUS "Configuring open62541 in ${OPEN62541_BUILD_DIR}...") @@ -60,9 +72,10 @@ else() message(STATUS "open62541 already built, skipping") endif() -# --- qtopcua --- +# ====================================== +# QtOpcUa +# ====================================== -message(STATUS "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}") find_program(QT_CMAKE_COMMAND bin/qt-cmake REQUIRED) if(NOT EXISTS "${QTOPCUA_BUILD_DIR}/lib/libQt6OpcUa.so") @@ -76,6 +89,7 @@ if(NOT EXISTS "${QTOPCUA_BUILD_DIR}/lib/libQt6OpcUa.so") "${QTOPCUA_BUILD_DIR}" -G Ninja + # Use our locally-built open62541, not the bundled copy -DINPUT_open62541=system -DCMAKE_PREFIX_PATH=${OPEN62541_INSTALL_DIR}) execute_process(COMMAND ${_cmd} RESULT_VARIABLE _result) -- cgit v1.2.3