From 260b12a99dcc8971e9fa74d6952c1de717c2b43b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 3 Oct 2024 11:13:43 +0200 Subject: [PATCH] [AppKit] Remove the NS[Open|Save]Panel constructors in XAMCORE_5_0. Fixes #6474. (#21346) These constructors haven't worked since macOS 10.14 (see #6474), so just remove them (when we can make breaking changes). Fixes https://github.com/xamarin/xamarin-macios/issues/6474. --- src/appkit.cs | 6 ++++++ tests/cecil-tests/Documentation.KnownFailures.txt | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/appkit.cs b/src/appkit.cs index b97be94109..9da780ebb5 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -9307,10 +9307,13 @@ namespace AppKit { [ForcedType] // different type used inside a sandbox NSOpenPanel OpenPanel { get; } +#if !XAMCORE_5_0 + [EditorBrowsable (EditorBrowsableState.Never)] [Advice ("You must use 'OpenPanel' method if the application is sandboxed.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "All open panels now run out-of-process, use 'OpenPanel' method instead")] [Export ("init")] NativeHandle Constructor (); +#endif [Export ("URLs")] NSUrl [] Urls { get; } @@ -13652,10 +13655,13 @@ namespace AppKit { [ForcedType] // different type used inside a sandbox NSSavePanel SavePanel { get; } +#if !XAMCORE_5_0 [Advice ("You must use 'SavePanel' method if the application is sandboxed.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "All save panels now run out-of-process, use 'SavePanel' method instead")] + [EditorBrowsable (EditorBrowsableState.Never)] [Export ("init")] NativeHandle Constructor (); +#endif [Export ("URL")] NSUrl Url { get; } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 900ecf8af7..c8004636b0 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -24342,7 +24342,6 @@ M:AppKit.NSOpenGLPixelFormat.#ctor(System.Object[]) M:AppKit.NSOpenGLPixelFormat.#ctor(System.UInt32[]) M:AppKit.NSOpenGLPixelFormat.EncodeTo(Foundation.NSCoder) M:AppKit.NSOpenGLView.#ctor(CoreGraphics.CGRect) -M:AppKit.NSOpenPanel.#ctor M:AppKit.NSOpenPanel.BeginSheet(System.String,System.String,System.String[],AppKit.NSWindow,System.Action) M:AppKit.NSOpenPanel.BeginSheet(System.String,System.String,System.String[],AppKit.NSWindow) M:AppKit.NSOpenSaveExpandingEventArgs.#ctor(System.Boolean) @@ -24687,7 +24686,6 @@ M:AppKit.NSRulerMarkerClientViewDelegation.RulerViewLocation(AppKit.NSView,AppKi M:AppKit.NSRulerMarkerClientViewDelegation.RulerViewPoint(AppKit.NSView,AppKit.NSRulerView,System.Runtime.InteropServices.NFloat) M:AppKit.NSRulerView.#ctor(CoreGraphics.CGRect) M:AppKit.NSRulerView.Dispose(System.Boolean) -M:AppKit.NSSavePanel.#ctor M:AppKit.NSSavePanel.add_DidChangeToDirectory(System.EventHandler{AppKit.NSOpenSavePanelUrlEventArgs}) M:AppKit.NSSavePanel.add_DidSelectType(System.EventHandler{AppKit.NSopenSavePanelUTTypeEventArgs}) M:AppKit.NSSavePanel.add_DirectoryDidChange(System.EventHandler{AppKit.NSOpenSaveFilenameEventArgs})