summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorYan Shapochnik <shapochniky@seapine.com>2012-04-11 14:50:41 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-15 07:08:51 (GMT)
commita0107b783df9b61221ea57b79fefb8fa77f917ed (patch)
tree1f81008c9553e8985e1a0ccbd629b3460037e270 /src/gui
parentc7e34fccc4366391487d6d9eb4bb58dd374e8035 (diff)
downloadQt-a0107b783df9b61221ea57b79fefb8fa77f917ed.zip
Qt-a0107b783df9b61221ea57b79fefb8fa77f917ed.tar.gz
Qt-a0107b783df9b61221ea57b79fefb8fa77f917ed.tar.bz2
Mangle QNSApplication into a namespace when Qt is configured as such
Ensure the correct QNSApplication is referenced when multiple Qt instances exist in a process. This will also prevent the following messages from being displayed in the console "Class QNSApplication is implemented in both /path/to/QtGui.framework/Versions/4/QtGui and /path/QtGuiNamespaced.framework/Versions/4/QtGuiNamespaced. One of the two will be used. Which one is undefined. Change-Id: I22e7f06aa35e9daecf2e9c881268baf92d35022c Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qapplication_mac.mm2
-rw-r--r--src/gui/kernel/qcocoaapplication_mac.mm2
-rw-r--r--src/gui/kernel/qcocoaapplication_mac_p.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index ab4c0be..c276ffe 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1243,7 +1243,7 @@ void qt_init(QApplicationPrivate *priv, int)
// Cocoa application delegate
#ifdef QT_MAC_USE_COCOA
- NSApplication *cocoaApp = [QNSApplication sharedApplication];
+ NSApplication *cocoaApp = [QT_MANGLE_NAMESPACE(QNSApplication) sharedApplication];
qt_redirectNSApplicationSendEvent();
QMacCocoaAutoReleasePool pool;
diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm
index 1446aa1..16ac578 100644
--- a/src/gui/kernel/qcocoaapplication_mac.mm
+++ b/src/gui/kernel/qcocoaapplication_mac.mm
@@ -155,7 +155,7 @@ QT_USE_NAMESPACE
@end
-@implementation QNSApplication
+@implementation QT_MANGLE_NAMESPACE(QNSApplication)
- (void)qt_sendEvent_original:(NSEvent *)event
{
diff --git a/src/gui/kernel/qcocoaapplication_mac_p.h b/src/gui/kernel/qcocoaapplication_mac_p.h
index 7fb3035..8b5284a 100644
--- a/src/gui/kernel/qcocoaapplication_mac_p.h
+++ b/src/gui/kernel/qcocoaapplication_mac_p.h
@@ -104,7 +104,7 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate)
- (BOOL)qt_filterEvent:(NSEvent *)event;
@end
-@interface QNSApplication : NSApplication {
+@interface QT_MANGLE_NAMESPACE(QNSApplication) : NSApplication {
}
@end