diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-07-01 13:58:27 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-07-01 12:03:38 +0000 |
commit | b93264a6f1b41db2c8f865e452b687390c6897a8 (patch) | |
tree | 993ac128dc9b82506924c48cf4e8597f07ec12b8 /src/gui/kernel/qhighdpiscaling_p.h | |
parent | d6813d00410a79e133ee58d1197feb5dee877974 (diff) |
Clean up comments and dead code
Change-Id: Iadaca71328404bd6c526af5095b32e5e35548182
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling_p.h')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling_p.h | 32 |
1 files changed, 2 insertions, 30 deletions
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 <typename T> T fromNativePixels(const T &pixelValue, const QWindow *window) @@ -443,23 +432,6 @@ QVector<T> toNativePixels(const QVector<T> &pointValues, const QWindow *window) return pixelValues; } -#if 0 -// Any QPair<T, U> where T and U has operator/() -template <typename T, typename U> -QPair<T, U> fromNativePixels(const QPair<T, U> &pixelPair, const QWindow *window) -{ - return qMakePair(fromNativePixels(pixelPair.first, window), - fromNativePixels(pixelPair.second, window)); -} - -// Any QPair<T, U> where T and U has operator*() -template <typename T, typename U> -QPair<T, U> toNativePixels(const QPair<T, U> &pointPair, const QWindow *window) -{ - return qMakePair(QHighDpi::toNativePixels(pointPair.first, window), - QHighDpi::toNativePixels(pointPair.second, window)); -} -#endif } QT_END_NAMESPACE |