diff --git a/SuperBuild/patches/QT5/qt5-2-undefVar-macx.diff b/SuperBuild/patches/QT5/qt5-2-undefVar-macx.diff index 9a9e52ca675c83130c8a4e12f1cf62d20a23a380..7fcdd42a699fa80a83b5fb8de33e0d5a5ddeace2 100644 --- a/SuperBuild/patches/QT5/qt5-2-undefVar-macx.diff +++ b/SuperBuild/patches/QT5/qt5-2-undefVar-macx.diff @@ -9,3 +9,62 @@ { qSwap(value, other.value); } QAppleRefCounted &operator=(const QAppleRefCounted &other) { QAppleRefCounted copy(other); swap(copy); return *this; } +--- qt-everywhere-src-5.10.1/qtbase/src/corelib/kernel/qcore_foundation.mm 2018-02-08 19:24:48.000000000 +0100 ++++ QT5/qtbase/src/corelib/kernel/qcore_foundation.mm 2018-04-11 17:03:51.018596589 +0200 +@@ -488,7 +488,7 @@ + */ + NSTimeZone *QTimeZone::toNSTimeZone() const + { +- return [static_cast<NSTimeZone *>(toCFTimeZone()) autorelease]; ++ return [((NSTimeZone *) toCFTimeZone()) autorelease]; + } + #endif + +--- qt-everywhere-src-5.10.1/qtbase/src/platformsupport/clipboard/qmacmime.mm 2018-02-08 19:24:48.000000000 +0100 ++++ QT5/qtbase/src/platformsupport/clipboard/qmacmime.mm 2018-04-11 17:13:54.799982725 +0200 +@@ -853,11 +853,11 @@ + + QImage img = qvariant_cast<QImage>(variant); + NSDictionary *props = @{ +- static_cast<NSString *>(kCGImagePropertyPixelWidth) : [NSNumber numberWithInt:img.width()], +- static_cast<NSString *>(kCGImagePropertyPixelHeight) : [NSNumber numberWithInt:img.height()] ++ ((NSString *) kCGImagePropertyPixelWidth) : [NSNumber numberWithInt:img.width()], ++ ((NSString *) kCGImagePropertyPixelHeight) : [NSNumber numberWithInt:img.height()] + }; + +- CGImageDestinationAddImage(imageDestination, qt_mac_toCGImage(img), static_cast<CFDictionaryRef>(props)); ++ CGImageDestinationAddImage(imageDestination, qt_mac_toCGImage(img), (CFDictionaryRef) props); + CGImageDestinationFinalize(imageDestination); + + return QList<QByteArray>() << QByteArray::fromCFData(data); +--- qt-everywhere-src-5.10.1/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm 2018-02-08 19:24:48.000000000 +0100 ++++ QT5/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm 2018-04-11 17:36:09.563188504 +0200 +@@ -1684,7 +1684,7 @@ + + if (!m_drawContentBorderGradient) { + window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask; +- [window.contentView.superview setNeedsDisplay:YES]; ++ [[[window contentView] superview] setNeedsDisplay:YES]; + window.titlebarAppearsTransparent = NO; + return; + } +--- qt-everywhere-src-5.10.1/qtbase/src/plugins/platforms/cocoa/qnswindow.mm 2018-02-08 19:24:48.000000000 +0100 ++++ QT5/qtbase/src/plugins/platforms/cocoa/qnswindow.mm 2018-04-11 18:27:43.952730012 +0200 +@@ -231,7 +231,7 @@ + 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 @@ + + (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)