Merge pull request #33989 from LnL7/darwin-qt

qt510-qtbase: fix darwin build
This commit is contained in:
Thomas Tuegel 2018-01-20 09:06:34 -06:00 committed by GitHub
commit a97eaae950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 1 deletions

View File

@ -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 ];

View 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)