Move deletion of the QDrag object into QDragManager::drag().
The QDrag objects were apparently leaking on all platforms other than XCB. Task-number: QTBUG-39651 Change-Id: I09efcd250c1f42eb385e9d5779be7af6b9b59376 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
parent
7beca6e20f
commit
e4becdc3d3
@ -142,6 +142,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
|
|||||||
QGuiApplicationPrivate::instance()->notifyDragStarted(o);
|
QGuiApplicationPrivate::instance()->notifyDragStarted(o);
|
||||||
const Qt::DropAction result = m_platformDrag->drag(m_object);
|
const Qt::DropAction result = m_platformDrag->drag(m_object);
|
||||||
m_object = 0;
|
m_object = 0;
|
||||||
|
o->deleteLater();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1010,9 +1010,6 @@ void QXcbDrag::handleFinished(const xcb_client_message_event_t *event)
|
|||||||
// current_target = 0;
|
// current_target = 0;
|
||||||
// current_proxy_target = 0;
|
// current_proxy_target = 0;
|
||||||
|
|
||||||
if (t.drag)
|
|
||||||
t.drag->deleteLater();
|
|
||||||
|
|
||||||
// current_target = target;
|
// current_target = target;
|
||||||
// current_proxy_target = proxy_target;
|
// current_proxy_target = proxy_target;
|
||||||
// current_embedding_widget = embedding_widget;
|
// current_embedding_widget = embedding_widget;
|
||||||
|
Loading…
Reference in New Issue
Block a user