From d15593c7aa926860b4b72bba124382002341d688 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 2 Oct 2025 15:35:05 +0200 Subject: [PATCH] Add doxygen documentation for dcCanditateDc(). --- common/src/utils_internal.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/common/src/utils_internal.cpp b/common/src/utils_internal.cpp index ecf21d1..a8f293b 100644 --- a/common/src/utils_internal.cpp +++ b/common/src/utils_internal.cpp @@ -92,12 +92,27 @@ std::unique_ptr readSettings(QString const &optionalDirName) { qCritical().noquote() << "read" << fileName << ":" << fi.absoluteFilePath() << "not found."; } } else { - qCritical().noquote() << "read" << fileName << ":" << internal::DEFAULT_INSTALL_DIR << "not found."; + qCritical().noquote() << internal::DEFAULT_INSTALL_DIR << "not found."; } return settings; } +/*! \brief Find dc-binary to install. + * + * If rootDir is empty, and if dcDirectory is empty as well, use etc/dc in + * custome repository (e,.g. /opt/app/tools/atbupdate/customer_337/etc/dc). + * If dcDirectory is not empty, then use it. + * If rootDir is \b not empty,check if it alreay ends with "/etc/dc/". in this + * case, use rootDir as dcDir. Otherwise, if dcDirectory is empty, use rootDir/etc/dc + * (e,.g. /opt/app/tools/atbupdate/customer_337/etc/dc). If dcDirectory + * is not empty, use roorDir/dcDirectory. + * As last resort, try "/etc/dc". + * + * \param[in] dcDirectory directory of device controller binary. Maybe empty. + * \param[in] rootDir root directory for dcDirectory. Might be empty. + * \return name of the found candidate, or null if not found. + */ std::unique_ptr dcCandidateToInstall(QString const &dcDirectory, QString const &rootDir) { std::unique_ptr dcCandidate{nullptr};