QSignalBlocker: plaster with [[nodiscard]]
It's a RAII class, and RAII classes should be marked [[nodiscard]] at the class as well as the ctor level. Task-number: QTBUG-104164 Change-Id: I77260dc00d51d62ed1064e13f566d04e88d28ef9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 16a19a4f4ab207eba4ba6da987b31628b51903b0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
df759d34eb
commit
c325766423
@ -436,13 +436,16 @@ inline QBindingStorage *qGetBindingStorage(QObject *o)
|
||||
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
|
||||
#endif
|
||||
|
||||
class QSignalBlocker
|
||||
class [[nodiscard]] QSignalBlocker
|
||||
{
|
||||
public:
|
||||
Q_NODISCARD_CTOR
|
||||
inline explicit QSignalBlocker(QObject *o) noexcept;
|
||||
Q_NODISCARD_CTOR
|
||||
inline explicit QSignalBlocker(QObject &o) noexcept;
|
||||
inline ~QSignalBlocker();
|
||||
|
||||
Q_NODISCARD_CTOR
|
||||
inline QSignalBlocker(QSignalBlocker &&other) noexcept;
|
||||
inline QSignalBlocker &operator=(QSignalBlocker &&other) noexcept;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user