nixpkgs/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch
averelld 1999d279ec qt5: 5.11.0 -> 5.11.1 (#42351)
This may be needed to unbreak a couple of builds such as nextcloud clients or rstudio: codereview.qt-project.org/#/c/232367
2018-07-05 02:37:48 +00:00

71 lines
3.6 KiB
Diff

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/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index a17a02b629..d76c42fa03 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -114,7 +114,7 @@ void QCocoaScreen::updateGeometry()
return;
// The reference screen for the geometry is always the primary screen
- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 72f3bc0075..a9c058a850 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1676,7 +1676,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 cb13b7d184..0159d68dca 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -231,7 +231,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];
}
@@ -260,7 +260,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)