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: 15637 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 F10B923E39 for ; Mon, 25 Mar 2013 22:31:41 +0000 (UTC) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by fiordland.canonical.com (Postfix) with ESMTP id AF69EA195EC for ; Mon, 25 Mar 2013 22:31:41 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id ox1so760262veb.7 for ; Mon, 25 Mar 2013 15:31:41 -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=6cbMDyandFTu77B73jlTGHkwsYAwPYGtSFspfXVhKIc=; b=Vq2BqBVcAs+IyRX3umx2Vq3MMKHQrqNZT8txDuy9ghwjC1a1zb01DwXnmvbe8+7Pv2 jxrcolijvluytCJ4JUt++bgXMncKC1ch3rbHz0hrluBNB5mZOYQscKBizR3ZqMa4n7+U biPrKN12gWEpGPJgICco2fKDi21jgcesPJtGLnXVAfCwHP8qvAkIWjctcxXG2Qf7uUFE 5AJGhb+vHg38JxAtKjS3Gw04NJs8xR3rrSyU6doUwOKyop66fqepesyKQohm2JACbPJW +u7lzBS5oTft29uK5wR6zJwQ2yniS1FKJ947UAhdljHn6q4Kye0LCMd7KuaXaGLE8nFk XsQA== X-Received: by 10.52.31.103 with SMTP id z7mr15224869vdh.56.1364250701263; Mon, 25 Mar 2013 15:31:41 -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.59.4.204 with SMTP id cg12csp45845ved; Mon, 25 Mar 2013 15:31:40 -0700 (PDT) X-Received: by 10.15.22.76 with SMTP id e52mr30059899eeu.7.1364250697222; Mon, 25 Mar 2013 15:31:37 -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 d42si22794193eep.216.2013.03.25.15.31.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 15:31:37 -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 1UKFvT-00024a-1s; Mon, 25 Mar 2013 22:31:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH v2 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method 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-Gm-Message-State: ALoCoQmmFj25CpxtsTyCpq02YT2Ml8Mm6snfiWnE5S8rZIwINVOrbpcCM2j4x1HLYYNMmgbtwF1V 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 );