From af2f78f1277a5edda831f97796ee962afaf1eb71 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 27 Nov 2023 23:40:07 +0100 Subject: [PATCH] depends: qt: fix builds on x86_64-apple-darwin --- contrib/depends/packages/qt.mk | 2 + ...ence-warning-about-supporting-secure.patch | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 contrib/depends/patches/qt/revert-macOS-Silence-warning-about-supporting-secure.patch diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index ccf0e06..81fbc41 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -19,6 +19,7 @@ $(package)_patches += revert_f99ee441.patch $(package)_patches += xcb-util-image-fix.patch $(package)_patches += libxau-fix.patch $(package)_patches += toolchain.cmake +$(package)_patches += revert-macOS-Silence-warning-about-supporting-secure.patch #$(package)_patches += fix-static-fontconfig-static-linking.patch $(package)_qttools_file_name=qttools-$($(package)_suffix) @@ -188,6 +189,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/revert_f99ee441.patch && \ patch -p1 -i $($(package)_patch_dir)/xcb-util-image-fix.patch && \ patch -p1 -i $($(package)_patch_dir)/libxau-fix.patch && \ + patch -p1 -i $($(package)_patch_dir)/revert-macOS-Silence-warning-about-supporting-secure.patch && \ cd ../qtmultimedia && \ patch -p1 -i $($(package)_patch_dir)/qtmultimedia-fixes.patch && \ patch -p1 -i $($(package)_patch_dir)/v4l2.patch diff --git a/contrib/depends/patches/qt/revert-macOS-Silence-warning-about-supporting-secure.patch b/contrib/depends/patches/qt/revert-macOS-Silence-warning-about-supporting-secure.patch new file mode 100644 index 0000000..3bd3c17 --- /dev/null +++ b/contrib/depends/patches/qt/revert-macOS-Silence-warning-about-supporting-secure.patch @@ -0,0 +1,42 @@ +From 06cbaff877b0a5fc7e093494ee76eb32df31443f Mon Sep 17 00:00:00 2001 +From: tobtoht +Date: Mon, 27 Nov 2023 23:36:07 +0200 +Subject: [PATCH] Revert "macOS: Silence warning about supporting secure state + restoration" + +This reverts commit 546dae9285fe97defdab73437d6ae2bf19b806d8. +--- + .../cocoa/qcocoaapplicationdelegate.mm | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +index 581777f240..6e5bcc01af 100644 +--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm ++++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +@@ -346,23 +346,6 @@ QT_USE_NAMESPACE + else + QWindowSystemInterface::handleFileOpenEvent(qurlString); + } +- +-- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)application +-{ +- if (@available(macOS 12, *)) { +- if ([reflectionDelegate respondsToSelector:_cmd]) +- return [reflectionDelegate applicationSupportsSecureRestorableState:application]; +- } +- +- // We don't support or implement state restorations via the AppKit +- // state restoration APIs, but if we did, we would/should support +- // secure state restoration. This is the default for apps linked +- // against the macOS 14 SDK, but as we target versions below that +- // as well we need to return YES here explicitly to silence a runtime +- // warning. +- return YES; +-} +- + @end + + @implementation QCocoaApplicationDelegate (Menus) +-- +2.43.0 +