QCocoaEventDispatcherPrivate members should not be static
authorBradley T. Hughes <bradley.hughes@nokia.com>
Wed, 4 Jan 2012 10:34:02 +0000 (11:34 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 5 Jan 2012 10:40:08 +0000 (11:40 +0100)
commitda47d70c32562458db629c73cd02325f190210f4
treecbe7bd3c57f0673de3c2de5044e84b0cb5db78ff
parenta8495549d05aa6588a333eb2bc79d5cc0eb48376
QCocoaEventDispatcherPrivate members should not be static

Keep the Cocoa event dispatcher's private data as normal members of
QCocoaEventDispatcherPrivate. This removes the global initializers for
the macTimerHash and cocoaModalSessionStask as well.

To keep timers working, we pass a pointer to the timer's MacTimerInfo
struct to the callback, instead of just the timer id. The MacTimerInfo
needs to keep a pointer back to the QCocoaEventDispatcherPrivate to get
access to the private's members.

Change-Id: Ic3a61e5e1d1d82030735de73cf0b0c70a13c21a4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm