From: Laszlo Agocs Date: Tue, 26 Aug 2014 08:28:53 +0000 (+0200) Subject: Do not send deferred deletes from the QQuickWindow dtor X-Git-Tag: v5.3.99+beta1~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=657766f19b31d83f361fd3c9ad717b207e1dff8c;p=platform%2Fupstream%2Fqtdeclarative.git Do not send deferred deletes from the QQuickWindow dtor Otherwise doing deleteLater() on an ancestor of the QQuickWindow will cause double deletion for that ancestor. This is typical when using WA_DeleteOnClose since that uses deleteLater(). Task-number: QTBUG-40920 Change-Id: I9146fc0854f77c42cad2eda23b3cdaa7a9e22080 Reviewed-by: Gunnar Sletta --- diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 1ec7837..5172689 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1108,8 +1108,6 @@ QQuickWindow::~QQuickWindow() d->windowManager->windowDestroyed(this); } - QCoreApplication::removePostedEvents(this, QEvent::DeferredDelete); - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); delete d->incubationController; d->incubationController = 0; #ifndef QT_NO_DRAGANDDROP delete d->dragGrabber; d->dragGrabber = 0;