Cocoa: use filterNativeEvent instead of the deprecated filterEvent

Change-Id: I76259d1a0d978fb2f7fb60cd0d05990365691b7e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Thiago Macieira 2012-08-20 22:21:31 +02:00 committed by Qt by Nokia
parent ce9b010ec6
commit f8704a3e95

View File

@ -545,7 +545,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
if (!excludeUserEvents) {
while (!d->queuedUserInputEvents.isEmpty()) {
event = static_cast<NSEvent *>(d->queuedUserInputEvents.takeFirst());
if (!filterEvent(event)) {
if (!filterNativeEvent("NSEvent", event, 0)) {
[NSApp sendEvent:event];
retVal = true;
}
@ -622,7 +622,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
d->queuedUserInputEvents.append(event);
continue;
}
if (!filterEvent(event)) {
if (!filterNativeEvent("NSEvent", event, 0)) {
[NSApp sendEvent:event];
retVal = true;
}
@ -643,7 +643,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
continue;
}
}
if (!filterEvent(event)) {
if (!filterNativeEvent("NSEvent", event, 0)) {
[NSApp sendEvent:event];
retVal = true;
}