diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-08-15 12:49:58 +0200 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-08-31 22:11:51 +0000 |
commit | a7d7634f1bfd3311ea56120726496bb18856ed6c (patch) | |
tree | 500a55a07a40bf6a03b83e54483ffeb1dbc322e5 /src/corelib/kernel/qobject.cpp | |
parent | 38380de63c53b27dc85a1ba49e1ffade1c183fdd (diff) |
Implement QSignalBlocker::dismiss()
...to set m_o to nullptr and prevent an existing QSignalBlocker from
touching the QObject, which it was created for.
Add documentation and implement an autotest.
Change-Id: Ic18e80af5a57df1928f9d36aa0ab7ad79b6525fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 7c109238b2..4b767b7b5b 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -763,6 +763,14 @@ QMetaCallEvent* QMetaCallEvent::create_impl(QtPrivate::SlotObjUniquePtr slotObj, */ /*! + \fn void QSignalBlocker::dismiss() + \since 6.7 + Dismisses the QSignalBlocker. It will no longer access the QObject + passed to its constructor. unblock(), reblock(), as well as + ~QSignalBlocker() will have no effect. +*/ + +/*! \class QObject \inmodule QtCore \brief The QObject class is the base class of all Qt objects. |