linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.15 / qtbase.patch.d / qtbase-sdk-10.12-mac.patch
blob3638268de7af02489fdbdedf13502f7088ad2b34
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.mm b/src/corelib/kernel/qcore_mac.mm
14 --- a/src/corelib/kernel/qcore_mac.mm
15 +++ b/src/corelib/kernel/qcore_mac.mm
16 @@ -261,16 +261,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 @@ -4251,7 +4251,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh
37 break;
38 #endif
39 case Metal:
40 -#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
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 @@ -43,7 +43,7 @@ win32 {
49 LIBS += -ld3d11 -ldxgi -ldxguid
52 -macos|ios {
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 @@ -133,7 +133,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
61 NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()];
62 Q_ASSERT(dragImage);
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 @@ -144,7 +144,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
70 CGFloat flippedY = dragImage.size.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:dragImage
77 at:event_location