Avoid qobject_cast
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 a5972f8ec3
(which fixed QGuiApplication, but not QApplication).
Change-Id: I0d5080495aa4fd4486db297968c4d06bbfacf89b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
a0be8ef271
commit
39df773eb5
@ -2978,7 +2978,8 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user