Avoid qobject_cast
This is slightly faster, and also avoids accessing the object's meta object that would cause any lazily created meta objects from being built. Change-Id: I0a78e09511c120bdbe707a1efc91ba480ab7680c Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
This commit is contained in:
parent
276a86592a
commit
a5972f8ec3
@ -1007,7 +1007,8 @@ bool QGuiApplication::notify(QObject *object, QEvent *event)
|
||||
}
|
||||
#endif
|
||||
|
||||
QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(qobject_cast<QWindow *>(object), event);
|
||||
if (object->isWindowType())
|
||||
QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event);
|
||||
return QCoreApplication::notify(object, event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user