This is slightly faster, and also avoids accessing the object's meta
object that would cause any lazily created meta objects (e.g., for
QML) from being built.
This is just a port of commit
a5972f8ec32631e70578c64e9d6c063b3c47f0f5
(which fixed QGuiApplication, but not QApplication).
Change-Id: I0d5080495aa4fd4486db297968c4d06bbfacf89b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
d->checkReceiverThread(receiver);
#endif
- QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(qobject_cast<QWindow *>(receiver), e);
+ if (receiver->isWindowType())
+ QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(receiver), e);
// capture the current mouse/keyboard state
if(e->spontaneous()) {