From 185a1e09f184e2788440cadeab8a16f2de99783c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 20 Sep 2024 10:16:31 +0200 Subject: [PATCH] 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 (cherry picked from commit 446e28926cbad9b5ff4b99e222a6bd4473b8c6fb) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qproperty_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h index e6e1dec2c2a..f4c8e69c889 100644 --- a/src/corelib/kernel/qproperty_p.h +++ b/src/corelib/kernel/qproperty_p.h @@ -244,6 +244,7 @@ struct CurrentCompatPropertyThief Q_DISABLE_COPY_MOVE(CurrentCompatPropertyThief) QScopedValueRollback m_guard; public: + Q_NODISCARD_CTOR CurrentCompatPropertyThief(QBindingStatus *status) : m_guard(status->currentCompatProperty, nullptr) {