QDebugStateSaver: mark ctors [[nodiscard]]

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

Pick-to: 6.6
Task-number: QTBUG-104164
Change-Id: Ia83fa003677a839734208b12bde2c6287c1b79a3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Marc Mutz 2023-06-13 09:34:12 +02:00
parent ffed431293
commit 8cad4c2903

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();