summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-05-21 13:41:37 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-05-21 13:52:32 (GMT)
commitf65a036ff7c4023a0603d2887b29bfe7e182034a (patch)
treedfc3dd5ff923d8cf8420e7fe23041332187d0f69 /src/gui/kernel/qapplication_mac.mm
parentf86eadaecbf5937638e035aa21eacf8a5d45ec5c (diff)
downloadQt-f65a036ff7c4023a0603d2887b29bfe7e182034a.zip
Qt-f65a036ff7c4023a0603d2887b29bfe7e182034a.tar.gz
Qt-f65a036ff7c4023a0603d2887b29bfe7e182034a.tar.bz2
Mac: fix bic breakage
Diffstat (limited to 'src/gui/kernel/qapplication_mac.mm')
-rw-r--r--src/gui/kernel/qapplication_mac.mm35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 4cd14df..afd7c4b 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -2613,43 +2613,28 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap
/*!
\fn bool QApplication::macEventFilter(EventHandlerCallRef caller, EventRef event)
- \warning This virtual function is only used under Mac OS X when Qt is based on Carbon.
+ \warning This virtual function is only used under Mac OS X, and behaves different
+ depending on if Qt is based on Carbon or Cocoa.
- If you create an application that inherits QApplication and reimplement
+ For the Carbon port, If you create an application that inherits QApplication and reimplement
this function, you get direct access to all Carbon Events that Qt registers
for from Mac OS X with this function being called with the \a caller and
the \a event.
- Return true if you want to stop the event from being processed.
- Return false for normal event dispatching. The default
- implementation returns false.
-
- \sa macEventFilter(void *nsevent)
-*/
-bool QApplication::macEventFilter(EventHandlerCallRef, EventRef)
-{
- return false;
-}
-
-/*!
- \fn bool QApplication::macEventFilter(void *nsevent)
+ For the Cocoa port, If you create an application that inherits QApplication and reimplement
+ this function, you get direct access to all Cocoa Events that Qt receives
+ from Mac OS X with this function being called with the \a caller being 0 and
+ the \a event being an NSEvent pointer:
- \warning This virtual function is only used under Mac OS X when Qt is based on Cocoa.
-
- If you create an application that inherits QApplication and reimplement
- this function, you get direct access to all NSEvents that Qt receives
- from Cocoa.
- \a nsevent is of type NSEvent *:
-
- NSEvent *e = static_cast<NSEvent *>(nsevent);
+ NSEvent *e = reinterpret_cast<NSEvent *>(event);
Return true if you want to stop the event from being processed.
Return false for normal event dispatching. The default
implementation returns false.
- \sa macEventFilter(EventHandlerCallRef caller, EventRef event)
+ \sa macEventFilter(void *nsevent)
*/
-bool QApplication::macEventFilter(void * /*NSEvent*/)
+bool QApplication::macEventFilter(EventHandlerCallRef, EventRef)
{
return false;
}