diff options
author | Andy Shaw <andy.shaw@digia.com> | 2012-02-13 14:45:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-12 13:40:18 +0200 |
commit | 5032ca8cde5ed6fa39acfde650d373fcb4ea7807 (patch) | |
tree | 9ae01976a24a8f5ed03fe072f06773affd0fcb12 /src/gui/kernel/qcocoaapplication_mac.mm | |
parent | 111889ea5a1b40e3dc54380298096a978e9a5684 (diff) |
Ensure that QApplication is cleaned up after itself on Mac
If the sendEvent function is replaced on the NSApplication, then
QApplication should ensure that it undoes that if it is destroyed while
the NSApplication is still running.
Task-number: QTBUG-24248
Change-Id: I087ae575b7d670fa8dacfb80636d813c7bceb41d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Diffstat (limited to 'src/gui/kernel/qcocoaapplication_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoaapplication_mac.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm index 5168ae54de..f595d7886b 100644 --- a/src/gui/kernel/qcocoaapplication_mac.mm +++ b/src/gui/kernel/qcocoaapplication_mac.mm @@ -218,5 +218,12 @@ void qt_redirectNSApplicationSendEvent() @selector(qt_sendEvent_original:)); } +void qt_resetNSApplicationSendEvent() +{ + qt_cocoa_change_back_implementation([NSApplication class], + @selector(sendEvent:), + @selector(qt_sendEvent_original:)); +} + QT_END_NAMESPACE #endif |