QWidget::destroy(): Release mouse and keyboard grab.

This used to happen in the platform widget code.

Task-number: QTBUG-26079

Change-Id: Id6de7473c2fa4381a39114d5122e06e3bde159fa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-06-08 14:34:48 +02:00 committed by Qt by Nokia
parent e454000abc
commit 1fb176eaf4

View File

@ -169,6 +169,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
if (this == QApplicationPrivate::active_window)
QApplication::setActiveWindow(0);
if (QWidget::mouseGrabber() == this)
releaseMouse();
if (QWidget::keyboardGrabber() == this)
releaseKeyboard();
setAttribute(Qt::WA_WState_Created, false);