From 8150fdb678256f69d738f0d20fffff47258bba65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 2 Oct 2014 10:36:41 +0000 Subject: [PATCH] Fix warning when compiling against OS X 10.10 SDK. Something broke NSApp compatibility object in 10.10 and its setDelegate: expects NSFileManagerDelegate, not NSApplicationDelegate, and the compiler warns about. Use the equivalent [NSApplication sharedApplication] object to fix this. Also cast appcontroller to the expected type, because passing untyped object to setDelegate: yields a warning as well. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/utils.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 4b4f003a7a..02843c83dd 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -369,7 +369,7 @@ bool wxApp::DoInitGui() } appcontroller = OSXCreateAppController(); - [NSApp setDelegate:appcontroller]; + [[NSApplication sharedApplication] setDelegate:(id wxOSX_10_6_AND_LATER())appcontroller]; [NSColor setIgnoresAlpha:NO]; // calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads