diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-07-22 16:15:55 +0200 |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2010-07-22 16:15:55 +0200 |
commit | c8bb76ec0b19da9e24512852dc8b00461e1a1b7b (patch) | |
tree | f33da7a7097c8ab24903938f4862dcc3bac23ff7 /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | df6549d1b95af017305744af04a7bb3b10025660 (diff) |
Fix the CGContext on Mac OS X. Sometimes we got
a bad context, resulting in wrong paintings.
It also unify the raster engine behavior among
platforms.
Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index e3478e6c37..2eee4347b9 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1332,7 +1332,7 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget) CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else - CGContextRef context = reinterpret_cast<CGContextRef>([[qt_mac_window_for(widget) graphicsContext] graphicsPort]); + CGContextRef context = (CGContextRef)[[NSGraphicsContext graphicsContextWithWindow:qt_mac_window_for(widget)] graphicsPort]; #endif return context; } |