QMacStyle: Use NSRect instead of CGRect in drawNSViewInRect()

Change-Id: I90fd62dea377dfa9569d1730a67136c7a5dc6f82
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
Gabriel de Dietrich 2014-10-03 13:50:30 +02:00
parent 1910454fe0
commit e3bfd9bea6

View File

@ -1897,11 +1897,11 @@ void QMacStylePrivate::drawNSViewInRect(NSView *view, const QRect &qtRect, QPain
[NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithGraphicsPort:ctx flipped:YES]];
CGRect rect = CGRectMake(qtRect.x() + 1, qtRect.y(), qtRect.width(), qtRect.height());
NSRect rect = NSMakeRect(qtRect.x() + 1, qtRect.y(), qtRect.width(), qtRect.height());
[backingStoreNSView addSubview:view];
view.frame = NSRectFromCGRect(rect);
[view drawRect:NSRectFromCGRect(rect)];
view.frame = rect;
[view drawRect:rect];
[view removeFromSuperviewWithoutNeedingDisplay];
[NSGraphicsContext restoreGraphicsState];