summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-04-22 10:29:48 +0000
committerAndreas Färber <andreas.faerber@web.de>2013-05-29 01:24:38 +0200
commit8bb3f1e3742ca8d26af7156e14068435437918a1 (patch)
tree1f693f26f352da52d4fe0b26827b1a7ad9d495a6
parent42a5dfe75f455fe7f3619ce44b7eb025ba631ee8 (diff)
downloadqemu-8bb3f1e3742ca8d26af7156e14068435437918a1.tar.gz
qemu-8bb3f1e3742ca8d26af7156e14068435437918a1.tar.bz2
qemu-8bb3f1e3742ca8d26af7156e14068435437918a1.zip
cocoa: Avoid deprecated NSOpenPanel filename method
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>
-rw-r--r--ui/cocoa.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index ec0972841f..bb59511da2 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 );