From ff6ba98759761ad31f86cd33414d454759c40679 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 14 Jun 2025 00:02:15 +0200 Subject: [PATCH] [docs] QScopeGuard: mention dismiss()ing in \class The class docs should include a discussion of salient API, not leave that only to \fn's. Amends 9229452e574e603aa86fd5adb28da33cf5879db9. Pick-to: 6.8 6.5 Change-Id: I53144c7e56eca21ceeda0c1bca0028e987da9e18 Reviewed-by: Thiago Macieira (cherry picked from commit 902e0a723acd24f1126af4d64fe37f8d6bbf079d) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 453aaf5759b99b21ede3263d6e4914070ebb8bcb) --- src/corelib/tools/qscopeguard.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/tools/qscopeguard.qdoc b/src/corelib/tools/qscopeguard.qdoc index 6d9874842a0..a3fee22ce34 100644 --- a/src/corelib/tools/qscopeguard.qdoc +++ b/src/corelib/tools/qscopeguard.qdoc @@ -18,6 +18,9 @@ QT_BEGIN_NAMESPACE your cleanup code is executed, whether the function is exited normally, exited early by a return statement, or exited by an exception. + A scope guard can be disabled using dismiss(), in which case the function + is not run at all. + \note Exceptions are not supported. The callable shouldn't throw when executed, copied or moved.