qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ui/cocoa: Replace fprintf with error_report


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] ui/cocoa: Replace fprintf with error_report
Date: Tue, 23 Feb 2021 14:20:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 2/23/21 2:11 PM, Akihiko Odaki wrote:
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> ---
>  ui/cocoa.m | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 0ef5fdf3b7a..900bc984733 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -270,7 +270,7 @@ static bool bool_with_iothread_lock(BoolCodeBlock block)
>  static int cocoa_keycode_to_qemu(int keycode)
>  {
>      if (ARRAY_SIZE(mac_to_qkeycode_map) <= keycode) {
> -        fprintf(stderr, "(cocoa) warning unknown keycode 0x%x\n", keycode);
> +        error_report("(cocoa) warning unknown keycode 0x%x", keycode);
>          return 0;
>      }
>      return mac_to_qkeycode_map[keycode];
> @@ -1071,7 +1071,7 @@ - (id) init
>          // create a view and add it to the window
>          cocoaView = [[QemuCocoaView alloc] initWithFrame:NSMakeRect(0.0, 
> 0.0, 640.0, 480.0)];
>          if(!cocoaView) {
> -            fprintf(stderr, "(cocoa) can't create a view\n");
> +            error_report("(cocoa) can't create a view");
>              exit(1);
>          }
>  
> @@ -1080,7 +1080,7 @@ - (id) init
>              
> styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskClosable
>              backing:NSBackingStoreBuffered defer:NO];
>          if(!normalWindow) {
> -            fprintf(stderr, "(cocoa) can't create window\n");
> +            error_report("(cocoa) can't create window");
>              exit(1);
>          }
>          [normalWindow setAcceptsMouseMovedEvents:YES];
> 

Alistair did this 3 years ago:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg484556.html
but it was never merged... so:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]