Remove usage of qt_mac_get_scaleFactor() as it is no longer needed

qt_mac_get_scaleFactor() uses a deprecated function, but as this
function is no longer needed internally anyway, just remove it.

Task-number: QTBUG-28574
Change-Id: I4e3cd2383ecc56aa6f9e3931a1806c62b1cedeb5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Andy Shaw 2012-12-16 22:40:41 +01:00 committed by The Qt Project
parent 4b7be05058
commit e307d60749
3 changed files with 2 additions and 14 deletions

View File

@ -84,8 +84,6 @@ HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion &region);
OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
CGFloat qt_mac_get_scalefactor();
QChar qt_mac_qtKey2CocoaKey(Qt::Key key);
Qt::Key qt_mac_cocoaKey2QtKey(QChar keyCode);

View File

@ -614,11 +614,6 @@ InvalidContext:
return err;
}
CGFloat qt_mac_get_scalefactor()
{
return [[NSScreen mainScreen] userSpaceScaleFactor];
}
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
{
switch (buttonNum) {

View File

@ -1376,13 +1376,8 @@ QCoreGraphicsPaintEngine::updateRenderHints(QPainter::RenderHints hints)
{
Q_D(QCoreGraphicsPaintEngine);
CGContextSetShouldAntialias(d->hd, hints & QPainter::Antialiasing);
static const CGFloat ScaleFactor = qt_mac_get_scalefactor();
if (ScaleFactor > 1.) {
CGContextSetInterpolationQuality(d->hd, kCGInterpolationHigh);
} else {
CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ?
kCGInterpolationHigh : kCGInterpolationNone);
}
CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ?
kCGInterpolationHigh : kCGInterpolationNone);
bool textAntialiasing = (hints & QPainter::TextAntialiasing) == QPainter::TextAntialiasing;
if (!textAntialiasing || d->disabledSmoothFonts) {
d->disabledSmoothFonts = !textAntialiasing;