don't forward events if there is no mainItem

reviewed by: "Bhushan Shah" <bhush94@gmail.com>

Change-Id: I73227ee1a8f55bf167e4f41758b95a5558ebbeb3
This commit is contained in:
Marco Martin 2014-11-03 11:50:35 +01:00
parent ce1ba8a687
commit cb3c53a616

View File

@ -1030,6 +1030,7 @@ bool Dialog::event(QEvent *event)
/*Fitt's law: if the containment has margins, and the mouse cursor clicked
* on the mouse edge, forward the click in the containment boundaries
*/
id (d->mainItem) {
switch (event->type()) {
case QEvent::MouseMove:
case QEvent::MouseButtonPress:
@ -1106,6 +1107,7 @@ bool Dialog::event(QEvent *event)
default:
break;
}
}
const bool retval = QQuickWindow::event(event);
if (event->type() != QEvent::DeferredDelete) {