提交 8bb3f1e3 编写于 作者: P Peter Maydell 提交者: Andreas Färber

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: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
上级 42a5dfe7
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册