QCocoaDrag: Only update m_lastView when it actually changes

The underlying QObjCWeakPointer used to track the view requires
a bit of bookkeeping, so avoid updating its value unless the
view actually changes.

Pick-to: 6.8 6.9
Change-Id: I6a1aeaf0e6e0eb221d55de00c8f30259832e58fa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2024-12-16 16:09:48 +01:00
parent 92012333d1
commit 2e80e74f37

View File

@ -35,7 +35,8 @@ void QCocoaDrag::setLastInputEvent(NSEvent *event, NSView *view)
{
[m_lastEvent release];
m_lastEvent = [event copy];
m_lastView = view;
if (view != m_lastView)
m_lastView = view;
}
QMimeData *QCocoaDrag::dragMimeData()