From 1fec23f9276fe80ea8973bba1f3d2870658a8199 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 29 Jul 2014 12:42:58 +0200 Subject: Enable devicePixelRatio for non-Apple platforms Remove #ifdef Q_OS_MAC around devicePixelRatio code. We are planning to make it available on other platforms. Task-number: QTBUG-38858 Change-Id: I25230cb53ea1291095335ef5883b15087e44f6b8 Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidget.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 05e638574d..95964bfb9d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -2028,17 +2028,11 @@ QRegion QWidgetPrivate::clipRegion() const void QWidgetPrivate::setSystemClip(QPaintDevice *paintDevice, const QRegion ®ion) { // Transform the system clip region from device-independent pixels to device pixels -// Qt 5.0.0: This is a Mac-only code path for now, can be made cross-platform once -// it has been tested. QPaintEngine *paintEngine = paintDevice->paintEngine(); -#ifdef Q_OS_MAC QTransform scaleTransform; const qreal devicePixelRatio = paintDevice->devicePixelRatio(); scaleTransform.scale(devicePixelRatio, devicePixelRatio); paintEngine->d_func()->systemClip = scaleTransform.map(region); -#else - paintEngine->d_func()->systemClip = region; -#endif } #ifndef QT_NO_GRAPHICSEFFECT -- cgit v1.2.3