From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhTgF-0005Vs-Te for qemu-devel@nongnu.org; Tue, 28 May 2013 19:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhTgE-0003CJ-0i for qemu-devel@nongnu.org; Tue, 28 May 2013 19:51:51 -0400 Received: from mout.web.de ([212.227.15.3]:55832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhTgD-0003C1-O7 for qemu-devel@nongnu.org; Tue, 28 May 2013 19:51:49 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 29 May 2013 01:51:20 +0200 Message-Id: <1369785081-4838-4-git-send-email-andreas.faerber@web.de> In-Reply-To: <1369785081-4838-1-git-send-email-andreas.faerber@web.de> References: <1369785081-4838-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 3/4] cocoa: Avoid deprecated NSOpenPanel filename method List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori From: Peter Maydell Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6) in favour of using the URL method and extracting the path from the resulting NSUrl object. Signed-off-by: Peter Maydell Signed-off-by: Andreas Färber --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index ec09728..bb59511 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -810,7 +810,7 @@ QemuCocoaView *cocoaView; exit(0); } else if(returnCode == NSOKButton) { const char *bin = "qemu"; - char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; + char *img = (char*)[ [ [ sheet URL ] path ] cStringUsingEncoding:NSASCIIStringEncoding]; char **argv = (char**)malloc( sizeof(char*)*3 ); -- 1.8.1.4