summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qscopeguard.h1
-rw-r--r--src/corelib/tools/qscopeguard.qdoc2
2 files changed, 2 insertions, 1 deletions
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 <typename F> QScopeGuard(F(&)()) -> QScopeGuard<F(*)()>;
#endif
+//! [qScopeGuard]
template <typename F>
#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 <typename F> const QScopeGuard<F> qScopeGuard(F f)
+ \fn [qScopeGuard] template <typename F> QScopeGuard<typename std::decay<F>::type> qScopeGuard(F &&f)
\inmodule QtCore
\relates QScopeGuard
\brief The qScopeGuard function can be used to call a function at the end