summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsscreen.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-22 12:21:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-22 14:26:43 +0000
commit78b2719b04f1177b5af0f52fce98316505f9000b (patch)
treea9acbf2b8cfb649abac05714a0e1cffbc54d1b7e /src/plugins/platforms/windows/qwindowsscreen.cpp
parent47ff3dcd087c1239e885439963f02bb8b53b19ed (diff)
Windows: Add checks to usages of QWindow::screen().
Default to primary screen and handle situations where the screen is null consistently. Remove unused QWindowsScreen::screenOf() method. Task-number: QTBUG-48288 Change-Id: I91b3c2331521d9d3be8ac77606ee820cd35ebb0f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index 391735a035..e6abfb2403 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -276,18 +276,6 @@ QWindow *QWindowsScreen::windowAt(const QPoint &screenPoint, unsigned flags)
return result;
}
-QWindowsScreen *QWindowsScreen::screenOf(const QWindow *w)
-{
- if (w)
- if (const QScreen *s = w->screen())
- if (QPlatformScreen *pscr = s->handle())
- return static_cast<QWindowsScreen *>(pscr);
- if (const QScreen *ps = QGuiApplication::primaryScreen())
- if (QPlatformScreen *ppscr = ps->handle())
- return static_cast<QWindowsScreen *>(ppscr);
- return 0;
-}
-
qreal QWindowsScreen::pixelDensity() const
{
const qreal physicalDpi = m_data.geometry.width() / m_data.physicalSizeMM.width() * qreal(25.4);