From: Peter Maydell <peter.maydell@linaro.org>
To: John Arbuckle <programmingkidx@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
"patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning
Date: Tue, 29 May 2018 19:11:48 +0100 [thread overview]
Message-ID: <CAFEAcA-E10Fp7MjgFpSoMTWyn5Wf0OTvSLWJC2LKnZJBT+-Gqw@mail.gmail.com> (raw)
In-Reply-To: <20180529180813.2647-1-programmingkidx@gmail.com>
On 29 May 2018 at 19:08, John Arbuckle <programmingkidx@gmail.com> wrote:
> OSX 10.13 deprecates the NSFileHandlingPanelOKButton constant, and
> would rather you use NSModalResponseOK, which was introduced in OS 10.9.
> Use the recommended new constant name, with a backward compatibility
> define if we're building on an older OSX.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> ---
> ui/cocoa.m | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 110b393..c9473f0 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -79,6 +79,13 @@
> #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
> #define NSWindowStyleMaskTitled NSTitledWindowMask
> #endif
> +/* 10.13 deprecates NSFileHandlingPanelOKButton in favor of
> + * NSModalResponseOK, which was introduced in 10.9. Define
> + * it for older versions.
> + */
> +#if !defined MAC_OS_X_VERSION_10_9 || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9
> +#define NSModalResponseOK NSFileHandlingPanelOKButton
> +#endif
We should just define MAC_OS_X_VERSION_10_9 if it's not
defined, the same way we do for the 10_5/10_6/10_10/10_12
constants. I'll respin my patch.
thanks
-- PMM
next prev parent reply other threads:[~2018-05-29 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 18:08 [Qemu-devel] [PATCH] ui/cocoa.m: Suppress NSFileHandlingPanelOKButton depreciation warning John Arbuckle
2018-05-29 18:11 ` Peter Maydell [this message]
2018-05-29 18:12 ` Programmingkid
2018-05-29 20:55 ` Eric Blake
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=CAFEAcA-E10Fp7MjgFpSoMTWyn5Wf0OTvSLWJC2LKnZJBT+-Gqw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=patches@linaro.org \
--cc=programmingkidx@gmail.com \
--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).