summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2014-07-29 12:42:58 +0200
committerPaul Olav Tvete <paul.tvete@digia.com>2014-08-06 17:33:51 +0200
commit1fec23f9276fe80ea8973bba1f3d2870658a8199 (patch)
tree637b1ef9362bcff257864044a56d60c8f0ecdca9 /src/widgets
parent1a47595d3a836c3c783dc3dbf85ce5b24f7ecf03 (diff)
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget.cpp6
1 files changed, 0 insertions, 6 deletions
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 &region)
{
// 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