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.cpp | |
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.cpp')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index 46c9f671df..62f28bd53e 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -242,29 +242,11 @@ void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor) m_active = true; screen->setProperty(scaleFactorProperty, QVariant(factor)); - //### dirty hack to force re-evaluation of screen geometry + // hack to force re-evaluation of screen geometry if (screen->handle()) - screen->d_func()->setPlatformScreen(screen->handle()); // update geometries based on scale factor + screen->d_func()->setPlatformScreen(screen->handle()); // updates geometries based on scale factor } -/* - -QPoint QXcbScreen::mapToNative(const QPoint &pos) const -{ - const int dpr = int(devicePixelRatio()); - return (pos - m_geometry.topLeft()) * dpr + m_nativeGeometry.topLeft(); -} - -QPoint QXcbScreen::mapFromNative(const QPoint &pos) const -{ - const int dpr = int(devicePixelRatio()); - return (pos - m_nativeGeometry.topLeft()) / dpr + m_geometry.topLeft(); -} - - - */ - - QPoint QHighDpiScaling::mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen) { if (!platformScreen) |