diff --git a/src/corelib/tools/qscopeguard.h b/src/corelib/tools/qscopeguard.h index 6a5bc6cc61..d288fd63fc 100644 --- a/src/corelib/tools/qscopeguard.h +++ b/src/corelib/tools/qscopeguard.h @@ -96,6 +96,7 @@ private: template QScopeGuard(F(&)()) -> QScopeGuard; #endif +//! [qScopeGuard] template #if __has_cpp_attribute(nodiscard) Q_REQUIRED_RESULT diff --git a/src/corelib/tools/qscopeguard.qdoc b/src/corelib/tools/qscopeguard.qdoc index 572934d890..b36299d296 100644 --- a/src/corelib/tools/qscopeguard.qdoc +++ b/src/corelib/tools/qscopeguard.qdoc @@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template const QScopeGuard qScopeGuard(F f) + \fn [qScopeGuard] template QScopeGuard::type> qScopeGuard(F &&f) \inmodule QtCore \relates QScopeGuard \brief The qScopeGuard function can be used to call a function at the end