summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-02-10 08:04:50 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-02-10 09:15:03 (GMT)
commit5be0f78985f73515645762b2895b6969be69a6e4 (patch)
treef6823851470d4de322c71b1e1f09cf7c29ddd097 /src/gui/kernel/qapplication_mac.mm
parent8b112609b7d86572fbb41dc59354da1f958d1910 (diff)
downloadQt-5be0f78985f73515645762b2895b6969be69a6e4.zip
Qt-5be0f78985f73515645762b2895b6969be69a6e4.tar.gz
Qt-5be0f78985f73515645762b2895b6969be69a6e4.tar.bz2
Cocoa: Implement our own NSApplication subclass
We have avoided doing so up till now, since we cannot always know if we will be able to use it. If some 3rd-party application creates NSApplication before Qt, our subclass will never be used (because of the singleton pattern that NSApplication follows). However, in most cases, Qt will be used in standalone applications, or the 3rd-party application will not subclass NSApplication. And in those cases, we can make certain functionallity more robust. Rev-By:msorvig
Diffstat (limited to 'src/gui/kernel/qapplication_mac.mm')
-rw-r--r--src/gui/kernel/qapplication_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 3fba833..0199e87 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1237,7 +1237,7 @@ void qt_init(QApplicationPrivate *priv, int)
// Cocoa application delegate
#ifdef QT_MAC_USE_COCOA
- NSApplication *cocoaApp = [NSApplication sharedApplication];
+ NSApplication *cocoaApp = [QNSApplication sharedApplication];
QMacCocoaAutoReleasePool pool;
NSObject *oldDelegate = [cocoaApp delegate];
QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];