linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.14 / qtbase.patch.d / qtbase-sdk-10.12-mac.patch
blobb2dff5aba8f6256520b7bb5af5f5f0cfff802523
1 diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
2 --- a/mkspecs/common/macx.conf
3 +++ b/mkspecs/common/macx.conf
4 @@ -10,7 +10,7 @@ QMAKE_APPLE_DEVICE_ARCHS = x86_64
6 # Should be 10.15, but as long as the CI builds with
7 # older SDKs we have to keep this.
8 -QT_MAC_SDK_VERSION_MIN = 10.14
9 +QT_MAC_SDK_VERSION_MIN = 10.12
11 QT_MAC_SDK_VERSION_MAX = 10.15
13 diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
14 --- a/src/corelib/kernel/qcore_mac_objc.mm
15 +++ b/src/corelib/kernel/qcore_mac_objc.mm
16 @@ -142,16 +142,10 @@ QMacAutoReleasePool::QMacAutoReleasePool()
18 #ifdef QT_DEBUG
19 void *poolFrame = nullptr;
20 - if (__builtin_available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 5.0, *)) {
21 - void *frame;
22 - if (backtrace_from_fp(__builtin_frame_address(0), &frame, 1))
23 - poolFrame = frame;
24 - } else {
25 static const int maxFrames = 3;
26 void *callstack[maxFrames];
27 if (backtrace(callstack, maxFrames) == maxFrames)
28 poolFrame = callstack[maxFrames - 1];
29 - }
31 if (poolFrame) {
32 Dl_info info;
33 diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
34 --- a/src/gui/rhi/qrhi.cpp
35 +++ b/src/gui/rhi/qrhi.cpp
36 @@ -4050,7 +4050,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh
37 #endif
38 case Metal:
39 //#ifdef Q_OS_DARWIN
40 -#ifdef Q_OS_MACOS
41 +#if 0
42 r->d = new QRhiMetal(static_cast<QRhiMetalInitParams *>(params),
43 static_cast<QRhiMetalNativeHandles *>(importDevice));
44 break;
45 diff --git a/src/gui/rhi/rhi.pri b/src/gui/rhi/rhi.pri
46 --- a/src/gui/rhi/rhi.pri
47 +++ b/src/gui/rhi/rhi.pri
48 @@ -44,7 +44,7 @@ win32 {
51 # darwin {
52 -macos {
53 +false {
54 HEADERS += \
55 rhi/qrhimetal_p.h \
56 rhi/qrhimetal_p_p.h
57 diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
58 --- a/src/plugins/platforms/cocoa/qcocoadrag.mm
59 +++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
60 @@ -134,7 +134,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
61 NSImage *nsimage = qt_mac_create_nsimage(pm);
62 [nsimage setSize:NSSizeFromCGSize(pmDeviceIndependentSize.toCGSize())];
64 - QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND);
65 + QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacInternalPasteboardMime::MIME_DND);
66 m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
67 dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest);
69 @@ -145,7 +145,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
70 CGFloat flippedY = pmDeviceIndependentSize.height() - hotSpot.y();
71 event_location.y -= flippedY;
72 NSSize mouseOffset_unused = NSMakeSize(0.0, 0.0);
73 - NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag];
74 + NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard];
76 [theWindow dragImage:nsimage
77 at:event_location