mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
Merge pull request #33989 from LnL7/darwin-qt
qt510-qtbase: fix darwin build
This commit is contained in:
commit
a97eaae950
@ -37,7 +37,7 @@ let
|
||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||
|
||||
patches = {
|
||||
qtbase = [ ./qtbase.patch ];
|
||||
qtbase = [ ./qtbase.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
|
57
pkgs/development/libraries/qt-5/5.10/qtbase-darwin.patch
Normal file
57
pkgs/development/libraries/qt-5/5.10/qtbase-darwin.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
index 341d3bccf2..3368234c26 100644
|
||||
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
|
||||
QMacAutoReleasePool pool;
|
||||
userProfiles.clear();
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
|
||||
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
|
||||
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
|
||||
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
scanThread->interfaceName = QString::fromNSString(ifName);
|
||||
scanThread->start();
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
index d1f19f2..1ac2cf1 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -1699,7 +1699,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
||||
|
||||
if (!m_drawContentBorderGradient) {
|
||||
window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
|
||||
- [window.contentView.superview setNeedsDisplay:YES];
|
||||
+ [[window.contentView superview] setNeedsDisplay:YES];
|
||||
window.titlebarAppearsTransparent = NO;
|
||||
return;
|
||||
}
|
||||
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
index e846fa0..4171cd4 100644
|
||||
--- a/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
@@ -224,7 +224,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSRect windowFrame = [self convertRectFromScreen:self.frame];
|
||||
- NSRect contentFrame = self.contentView.frame;
|
||||
+ NSRect contentFrame = [self.contentView frame];
|
||||
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
|
||||
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
|
||||
}
|
||||
@@ -253,7 +253,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
+ (void)applicationActivationChanged:(NSNotification*)notification
|
||||
{
|
||||
const id sender = self;
|
||||
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
|
||||
+ NSEnumerator *windowEnumerator = nullptr;
|
||||
NSApplication *application = [NSApplication sharedApplication];
|
||||
|
||||
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
|
Loading…
Reference in New Issue
Block a user