From b93264a6f1b41db2c8f865e452b687390c6897a8 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 1 Jul 2015 13:58:27 +0200 Subject: Clean up comments and dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iadaca71328404bd6c526af5095b32e5e35548182 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qhighdpiscaling_p.h | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'src/gui/kernel/qhighdpiscaling_p.h') diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index 5dd9db68c4..d2d8262b1d 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -93,16 +93,6 @@ private: namespace QHighDpi { -// inline QRect fromNativeGeometry(const QRect &pixelRect, const QPlatformScreen *platformScreen) -// { -// return QRect(pixelRect.topLeft(), pixelRect.size() / QHighDpiScaling::factor(platformScreen)); -// } - -// inline QRect toNativeGeometry(const QRect &pointRect, const QPlatformScreen *platformScreen) -// { -// return QRect(pointRect.topLeft(), pointRect.size() * QHighDpiScaling::factor(platformScreen)); -// } - inline QPoint fromNative(const QPoint &pos, qreal scaleFactor, const QPoint &origin) { return (pos - origin) / scaleFactor + origin; @@ -347,8 +337,7 @@ inline QMargins toNativePixels(const QMargins &pointMargins, const QWindow *wind return QMargins(pointMargins.left() * scaleFactor, pointMargins.top() * scaleFactor, pointMargins.right() * scaleFactor, pointMargins.bottom() * scaleFactor); } -#if 1 - //############## expose regions need special handling + inline QRegion fromNativeLocalRegion(const QRegion &pixelRegion, const QWindow *window) { if (!QHighDpiScaling::isActive()) @@ -374,7 +363,7 @@ inline QRegion toNativeLocalRegion(const QRegion &pointRegion, const QWindow *wi toNative(rect.size(), scaleFactor)); return pixelRegon; } -#endif + // Any T that has operator/() template T fromNativePixels(const T &pixelValue, const QWindow *window) @@ -443,23 +432,6 @@ QVector toNativePixels(const QVector &pointValues, const QWindow *window) return pixelValues; } -#if 0 -// Any QPair where T and U has operator/() -template -QPair fromNativePixels(const QPair &pixelPair, const QWindow *window) -{ - return qMakePair(fromNativePixels(pixelPair.first, window), - fromNativePixels(pixelPair.second, window)); -} - -// Any QPair where T and U has operator*() -template -QPair toNativePixels(const QPair &pointPair, const QWindow *window) -{ - return qMakePair(QHighDpi::toNativePixels(pointPair.first, window), - QHighDpi::toNativePixels(pointPair.second, window)); -} -#endif } QT_END_NAMESPACE -- cgit v1.2.3