Port SlotObjectGuard to SlotObjUniquePtr
Pick-to: 6.6 6.5 Change-Id: I81e64db7e1be9076494bee15bbca372ebffeb3e0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
56651915e8
commit
cec711092f
@ -3769,17 +3769,14 @@ struct SlotObjectGuard {
|
||||
}
|
||||
|
||||
QtPrivate::QSlotObjectBase const *operator->() const
|
||||
{ return m_slotObject; }
|
||||
{ return m_slotObject.get(); }
|
||||
|
||||
QtPrivate::QSlotObjectBase *operator->()
|
||||
{ return m_slotObject; }
|
||||
{ return m_slotObject.get(); }
|
||||
|
||||
~SlotObjectGuard() {
|
||||
if (m_slotObject)
|
||||
m_slotObject->destroyIfLastRef();
|
||||
}
|
||||
~SlotObjectGuard() = default;
|
||||
private:
|
||||
QtPrivate::QSlotObjectBase *m_slotObject = nullptr;
|
||||
QtPrivate::SlotObjUniquePtr m_slotObject;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user