SlotObjectGuard: mark ctor nodiscard

QUIP: 19
Pick-to: 6.6
Change-Id: Idaf8cda12fe2ca97a763d78ff4c8cd7304d178e5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Marc Mutz 2023-07-16 14:24:43 +02:00
parent 144e10eafb
commit 3a166fa45d

View File

@ -3763,7 +3763,7 @@ struct SlotObjectGuard {
SlotObjectGuard() = default;
// move would be fine, but we do not need it currently
Q_DISABLE_COPY_MOVE(SlotObjectGuard)
explicit SlotObjectGuard(QtPrivate::QSlotObjectBase *slotObject)
Q_NODISCARD_CTOR explicit SlotObjectGuard(QtPrivate::QSlotObjectBase *slotObject)
: m_slotObject(slotObject)
{
if (m_slotObject)