From patchwork Mon Mar 25 22:31:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 231003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3DF5C2C00B2 for ; Tue, 26 Mar 2013 09:32:11 +1100 (EST) Received: from localhost ([::1]:44565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKFw1-0006h4-5Z for incoming@patchwork.ozlabs.org; Mon, 25 Mar 2013 18:32:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKFvY-0006g7-KF for qemu-devel@nongnu.org; Mon, 25 Mar 2013 18:31:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKFvW-00083k-5p for qemu-devel@nongnu.org; Mon, 25 Mar 2013 18:31:40 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:33202 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKFvV-00083N-VB for qemu-devel@nongnu.org; Mon, 25 Mar 2013 18:31:38 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UKFvT-00024a-1s; Mon, 25 Mar 2013 22:31:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 25 Mar 2013 22:31:33 +0000 Message-Id: <1364250694-7939-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1364250694-7939-1-git-send-email-peter.maydell@linaro.org> References: <1364250694-7939-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org Subject: [Qemu-devel] [PATCH v2 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index e768b05..36181d9 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 );