summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 0cf0942dab..8da299d491 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -660,10 +660,6 @@ QImage::Format QXcbScreen::format() const
int QXcbScreen::forcedDpi() const
{
- static const int overrideDpi = qEnvironmentVariableIntValue("QT_FONT_DPI");
- if (overrideDpi)
- return overrideDpi;
-
const int forcedDpi = m_virtualDesktop->forcedDpi();
if (forcedDpi > 0)
return forcedDpi;
@@ -679,11 +675,6 @@ QDpi QXcbScreen::logicalDpi() const
return m_virtualDesktop->dpi();
}
-qreal QXcbScreen::pixelDensity() const
-{
- return m_pixelDensity;
-}
-
QPlatformCursor *QXcbScreen::cursor() const
{
return m_cursor;
@@ -747,14 +738,6 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
if (m_sizeMillimeters.isEmpty())
m_sizeMillimeters = sizeInMillimeters(geometry.size(), m_virtualDesktop->dpi());
- qreal dpi = forcedDpi();
- if (dpi <= 0)
- dpi = geometry.width() / physicalSize().width() * qreal(25.4);
-
- // Use 128 as a reference DPI on small screens. This favors "small UI" over "large UI".
- qreal referenceDpi = physicalSize().width() <= 320 ? 128 : 96;
-
- m_pixelDensity = qMax(1, qRound(dpi/referenceDpi));
m_geometry = geometry;
m_availableGeometry = geometry & m_virtualDesktop->workArea();
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
@@ -925,7 +908,7 @@ QByteArray QXcbScreen::getEdid() const
static inline void formatRect(QDebug &debug, const QRect r)
{
debug << r.width() << 'x' << r.height()
- << forcesign << r.x() << r.y() << noforcesign;
+ << Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
}
static inline void formatSizeF(QDebug &debug, const QSizeF s)
@@ -939,7 +922,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
debug.nospace();
debug << "QXcbScreen(" << (const void *)screen;
if (screen) {
- debug << fixed << qSetRealNumberPrecision(1);
+ debug << Qt::fixed << qSetRealNumberPrecision(1);
debug << ", name=" << screen->name();
debug << ", geometry=";
formatRect(debug, screen->geometry());
@@ -957,7 +940,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
debug << "), orientation=" << screen->orientation();
debug << ", depth=" << screen->depth();
debug << ", refreshRate=" << screen->refreshRate();
- debug << ", root=" << hex << screen->root();
+ debug << ", root=" << Qt::hex << screen->root();
debug << ", windowManagerName=" << screen->windowManagerName();
}
debug << ')';