QtPrivate::CurrentCompatPropertyThief: add [[nodiscard]] to ctor

This is a RAII class, so it SHALL have a [[nodiscard]] ctor.

QUIP: 19
Pick-to: 6.7
Change-Id: I96728c04be3495d78a5c9c2ef105fbb4e53e58f0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 446e28926cbad9b5ff4b99e222a6bd4473b8c6fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-09-20 10:16:31 +02:00 committed by Qt Cherry-pick Bot
parent 3efd5950f3
commit 185a1e09f1

View File

@ -244,6 +244,7 @@ struct CurrentCompatPropertyThief
Q_DISABLE_COPY_MOVE(CurrentCompatPropertyThief)
QScopedValueRollback<CompatPropertySafePoint *> m_guard;
public:
Q_NODISCARD_CTOR
CurrentCompatPropertyThief(QBindingStatus *status)
: m_guard(status->currentCompatProperty, nullptr)
{