From patchwork Tue Mar 12 12:48:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15286 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AF3F923E10 for ; Tue, 12 Mar 2013 12:48:27 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id 70E62A18099 for ; Tue, 12 Mar 2013 12:48:27 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id m1so3455748ves.36 for ; Tue, 12 Mar 2013 05:48:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=eaipmBDBsQzE2zvhZIqw/yttCspWk9gUtAfQSvN62BU=; b=iI65JBRiOIZCfZOBISSBFUZFi6j2cJOvAMm2e490TkNuXcMEc3Bb+QNKeD/TeXsy1h 2gTtru3g+P9XrxWQHk0+4V5SanbtTWTGRxO/a7J0vxFCnmMWiddvwjEukNglrtQ2Z860 D1bhSAGZk6rfeJ5TrIoYnXf3+TNAiy2DKPq5+D9n7Crj9zvsf37X4gPTEU84ep6bvoPW c4WP4zmQNH9wJHlPhctebXeTPTHGoI9rI02s93vvwJmwnEXaY8L1nGVfDJEbtSkyYcWI E7jPij7DV/m2TXJ1OQOfiTdpS95WUqY6A5gg5tIDibaq/ft/g0qJIFAbo4V1byBuT3DS WUBw== X-Received: by 10.220.242.73 with SMTP id lh9mr6119699vcb.49.1363092506954; Tue, 12 Mar 2013 05:48:26 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp126138veb; Tue, 12 Mar 2013 05:48:26 -0700 (PDT) X-Received: by 10.205.43.133 with SMTP id uc5mr6080724bkb.22.1363092498222; Tue, 12 Mar 2013 05:48:18 -0700 (PDT) Received: from mnementh.archaic.org.uk (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]) by mx.google.com with ESMTPS id c5si6683599bkw.157.2013.03.12.05.48.17 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 12 Mar 2013 05:48:18 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UFOcq-0005Cl-9Z; Tue, 12 Mar 2013 12:48:16 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method Date: Tue, 12 Mar 2013 12:48:15 +0000 Message-Id: <1363092496-19978-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1363092496-19978-1-git-send-email-peter.maydell@linaro.org> References: <1363092496-19978-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkHzrprPEcSrcAzqGNDCi1keg3Xxsb8NjQJQsBpoq4s/d7cWTvc7d7N3ubQNblItpjtRUHK 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 b40af59..2df481d 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -822,7 +822,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 );