diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-17 15:06:10 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-17 15:06:10 (GMT) |
commit | 97668bd920685d25faf82bfde2027305e67b202e (patch) | |
tree | 9e2f1efc273ffde3c80df5ddedd19d3b448208b9 /src/gui/kernel/qcocoaview_mac.mm | |
parent | 72aa2eb43b0cf5a6eef940da05ac58f605794ffb (diff) | |
parent | 77c4df1325c4bae10c99978a325febada9fd82d0 (diff) | |
download | Qt-97668bd920685d25faf82bfde2027305e67b202e.zip Qt-97668bd920685d25faf82bfde2027305e67b202e.tar.gz Qt-97668bd920685d25faf82bfde2027305e67b202e.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into alien-squached
Conflicts:
src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
src/gui/kernel/qcocoaview_mac.mm
src/gui/kernel/qwidget_mac.mm
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index c627b0b..dbf9d56 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -180,14 +180,14 @@ static int qCocoaViewCount = 0; [super dealloc]; } -- (BOOL)isOpaque; +- (BOOL)isOpaque { if (!qwidgetprivate) return [super isOpaque]; return qwidgetprivate->isOpaque; } -- (BOOL)isFlipped; +- (BOOL)isFlipped { return YES; } @@ -266,6 +266,7 @@ static int qCocoaViewCount = 0; } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; + CGContextRetain(cg); qwidgetprivate->hd = cg; // We steal the CGContext for flushing in the unified toolbar with the raster engine. @@ -354,6 +355,7 @@ static int qCocoaViewCount = 0; } qwidgetprivate->hd = 0; CGContextRestoreGState(cg); + CGContextRelease(cg); } - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent @@ -604,7 +606,7 @@ static int qCocoaViewCount = 0; [super tabletPoint:tabletEvent]; } -- (void)magnifyWithEvent:(NSEvent *)event; +- (void)magnifyWithEvent:(NSEvent *)event { QPoint qlocal, qglobal; QWidget *widgetToGetGesture = 0; @@ -624,7 +626,7 @@ static int qCocoaViewCount = 0; #endif // QT_NO_GESTURES } -- (void)rotateWithEvent:(NSEvent *)event; +- (void)rotateWithEvent:(NSEvent *)event { QPoint qlocal, qglobal; QWidget *widgetToGetGesture = 0; @@ -644,7 +646,7 @@ static int qCocoaViewCount = 0; #endif // QT_NO_GESTURES } -- (void)swipeWithEvent:(NSEvent *)event; +- (void)swipeWithEvent:(NSEvent *)event { QPoint qlocal, qglobal; QWidget *widgetToGetGesture = 0; @@ -671,7 +673,7 @@ static int qCocoaViewCount = 0; #endif // QT_NO_GESTURES } -- (void)beginGestureWithEvent:(NSEvent *)event; +- (void)beginGestureWithEvent:(NSEvent *)event { QPoint qlocal, qglobal; QWidget *widgetToGetGesture = 0; @@ -690,7 +692,7 @@ static int qCocoaViewCount = 0; #endif // QT_NO_GESTURES } -- (void)endGestureWithEvent:(NSEvent *)event; +- (void)endGestureWithEvent:(NSEvent *)event { QPoint qlocal, qglobal; QWidget *widgetToGetGesture = 0; |