QDebugStateSaver: mark ctors [[nodiscard]]

It's a RAII class, and RAII classes should have only [[nodiscard]]
constructors.

Task-number: QTBUG-104164
Change-Id: Ia83fa003677a839734208b12bde2c6287c1b79a3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8cad4c2903d014bb755bd2349f9c4d127a87cc7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-06-13 09:34:12 +02:00 committed by Qt Cherry-pick Bot
parent b04a8a90f8
commit ae41507317

View File

@ -214,7 +214,7 @@ class QDebugStateSaverPrivate;
class QDebugStateSaver
{
public:
Q_CORE_EXPORT
Q_NODISCARD_CTOR Q_CORE_EXPORT
QDebugStateSaver(QDebug &dbg);
Q_CORE_EXPORT
~QDebugStateSaver();