add patch file for qt
This commit is contained in:
42
depends/patches/qt/fix-cocoahelpers-macos.patch
Normal file
42
depends/patches/qt/fix-cocoahelpers-macos.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
--- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
|
||||
+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.h
|
||||
@@ -90,7 +90,7 @@ QBrush qt_mac_toQBrush(const NSColor *co
|
||||
// Creates a mutable shape, it's the caller's responsibility to release.
|
||||
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion);
|
||||
|
||||
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
|
||||
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
|
||||
|
||||
NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
|
||||
NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
|
||||
diff -pur a/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm b/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
|
||||
--- old/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
|
||||
+++ new/qtbase/src/plugins/platforms/cocoa/qcocoahelpers.mm
|
||||
@@ -650,15 +650,8 @@ NSRect qt_mac_flipRect(const QRect &rect
|
||||
return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
|
||||
}
|
||||
|
||||
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
|
||||
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
|
||||
{
|
||||
- // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
|
||||
- OSStatus err = noErr;
|
||||
-
|
||||
- require_action(inContext != NULL, InvalidContext, err = paramErr);
|
||||
- require_action(inBounds != NULL, InvalidBounds, err = paramErr);
|
||||
- require_action(inImage != NULL, InvalidImage, err = paramErr);
|
||||
-
|
||||
CGContextSaveGState( inContext );
|
||||
CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
|
||||
CGContextScaleCTM(inContext, 1, -1);
|
||||
@@ -666,10 +659,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef
|
||||
CGContextDrawImage(inContext, *inBounds, inImage);
|
||||
|
||||
CGContextRestoreGState(inContext);
|
||||
-InvalidImage:
|
||||
-InvalidBounds:
|
||||
-InvalidContext:
|
||||
- return err;
|
||||
}
|
||||
|
||||
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
|
||||
Reference in New Issue
Block a user