diff --git a/src/libs/solutions/tasking/tasktree.cpp b/src/libs/solutions/tasking/tasktree.cpp index e1373df4411..9bc87def665 100644 --- a/src/libs/solutions/tasking/tasktree.cpp +++ b/src/libs/solutions/tasking/tasktree.cpp @@ -376,6 +376,46 @@ private: \sa {Tasking::Storage} {Storage} */ +/*! + \fn GroupItem::GroupItem(const QList &items) + + Constructs a \c GroupItem element with a given list of \a items. + + When this \c GroupItem element is parsed by the TaskTree, it is simply replaced with + its \a items. + + This constructor is useful when constructing a \l {Tasking::Group} {Group} element with + lists of \c GroupItem elements: + + \code + static QList getItems(); + + ... + + const Group root { + parallel, + finishAllAndSuccess, + getItems(), // OK, getItems() list is wrapped into a single GroupItem element + onGroupSetup(...), + onGroupDone(...) + }; + \endcode + + If you want to create a subtree, use \l {Tasking::Group} {Group} instead. + + \note Don't confuse this \c GroupItem with the \l {Tasking::Group} {Group} element, as + \l {Tasking::Group} {Group} keeps its children nested + after being parsed by the task tree, while this \c GroupItem does not. + + \sa {Tasking::Group} {Group} +*/ + +/*! + \fn GroupItem::GroupItem(std::initializer_list items) + \overload + \sa GroupItem(const QList &items) +*/ + /*! \class Tasking::Group \inheaderfile solutions/tasking/tasktree.h @@ -519,69 +559,6 @@ private: and the returned item finishes with an error. */ -/*! - \class Tasking::List - \inheaderfile solutions/tasking/tasktree.h - \inmodule TaskingSolution - \brief List is a helper element that wraps a list of GroupItem elements into a single - GroupItem element. - \reentrant - - \c List is useful when constructing a \l {Tasking::Group} {Group} element with lists of - GroupItem elements. If you define a helper function that returns a list of GroupItem elements, - it's not easy to place them directly into a group together with other items. Instead, you may - wrap the returned list with the \c List element and place it like a single GroupItem element - inside a \l {Tasking::Group} {Group}: - - \code - static QList getItems(); - - ... - - const Group root { - parallel, - finishAllAndSuccess, - // getItems(), // Wrong, compile error, as we can't mix QList with - // GroupItems within the initializer list of root Group. - List(getItems()), // OK, getItems() list is wrapped into a single GroupItem element - // via the List element. - onGroupSetup(...), - onGroupDone(...) - }; - \endcode - - \c List may contain nested \c List elements. \c List doesn't do anything on its own. - When parsed by the task tree, the \c List element is simply replaced with its contents. - - \note Don't confuse \c List with the \l {Tasking::Group} {Group} element, as - \l {Tasking::Group} {Group} keeps its children nested - after being parsed by the task tree, while \c List does not. -*/ - -/*! - \fn List::List(const QList &children) - - Constructs a \c List element with a given list of \a children. - - When the \c List element is parsed by the task tree, it is simply replaced with its children. - - If you want to create a subtree, use \l {Tasking::Group} {Group} instead. - - \sa {Tasking::Group} {Group} -*/ - -/*! - \fn List::List(std::initializer_list children) - - Constructs a \c List element from \c std::initializer_list given by \a children. - - When the \c List element is parsed by the task tree, it is simply replaced with its children. - - If you want to create a subtree, use \l {Tasking::Group} {Group} instead. - - \sa {Tasking::Group} {Group} -*/ - /*! \class Tasking::Sync \inheaderfile solutions/tasking/tasktree.h