From 1be9f9cdc7c2ea7ec45a8667b290cdd6822a2b1b Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 20 Mar 2024 15:17:02 +0100 Subject: [PATCH] Doc: Add docs for ExecutableItem::withLog() Change-Id: I105a106139f1a658e5feed022e224e4e933dbcc1 Reviewed-by: Leena Miettinen --- src/libs/solutions/tasking/tasktree.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libs/solutions/tasking/tasktree.cpp b/src/libs/solutions/tasking/tasktree.cpp index e74d165b297..7d37bf97587 100644 --- a/src/libs/solutions/tasking/tasktree.cpp +++ b/src/libs/solutions/tasking/tasktree.cpp @@ -1430,6 +1430,17 @@ ExecutableItem ExecutableItem::withTimeout(milliseconds timeout, static QString currentTime() { return QTime::currentTime().toString(Qt::ISODateWithMs); } +/*! + Attaches a custom debug printout to a copy of \c this ExecutableItem, + issued on task startup and after the task is finished, and returns the coupled item. + + The debug printout includes a timestamp of the event (start or finish) + and \a logName to identify the specific task in the debug log. + + The finish printout contains the additional information whether the execution was + synchronous or asynchronous, its result (the value described by the DoneWith enum), + and the total execution time in milliseconds. +*/ ExecutableItem ExecutableItem::withLog(const QString &logName) const { const auto header = [logName] {