From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Andreas Färber" <andreas.faerber@web.de>,
"Anthony Liguori" <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PULL 3/4] cocoa: Avoid deprecated NSOpenPanel filename method
Date: Wed, 29 May 2013 01:51:20 +0200 [thread overview]
Message-ID: <1369785081-4838-4-git-send-email-andreas.faerber@web.de> (raw)
In-Reply-To: <1369785081-4838-1-git-send-email-andreas.faerber@web.de>
From: Peter Maydell <peter.maydell@linaro.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 <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
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
next prev parent reply other threads:[~2013-05-28 23:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 23:51 [Qemu-devel] [PULL 0/4] Cocoa patch queue 2013-05-29 Andreas Färber
2013-05-28 23:51 ` [Qemu-devel] [PULL 1/4] cocoa: Fix leaks of NSScreen and NSConcreteMapTable Andreas Färber
2013-05-28 23:51 ` [Qemu-devel] [PULL 2/4] cocoa: Avoid deprecated CPS* functions Andreas Färber
2013-05-28 23:51 ` Andreas Färber [this message]
2013-05-28 23:51 ` [Qemu-devel] [PULL 4/4] cocoa: Avoid deprecated NSOpenPanel beginSheetForDirectory Andreas Färber
2013-06-17 21:18 ` [Qemu-devel] [PULL 0/4] Cocoa patch queue 2013-05-29 Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369785081-4838-4-git-send-email-andreas.faerber@web.de \
--to=andreas.faerber@web.de \
--cc=aliguori@us.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).