summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-09 11:48:24 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-12 09:59:06 +0200
commit099f188bc8b21ae96d7839c4bae636b922b9e988 (patch)
tree73b41157122dd11d1965ed49a5e045c34abbb2d1 /src/plugins/platforms/xcb/qxcbscreen.cpp
parentdcb48c6dc65a216763354a137556317f6b403a56 (diff)
xcb: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: Ie625d79352fa166e45939ef8f0a5e0cc32f8e801 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 83ffb02362..691fba59d6 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -328,7 +328,7 @@ QDpi QXcbScreen::logicalDpi() const
qreal QXcbScreen::devicePixelRatio() const
{
- static int override_dpr = qgetenv("QT_DEVICE_PIXEL_RATIO").toInt();
+ static int override_dpr = qEnvironmentVariableIntValue("QT_DEVICE_PIXEL_RATIO");
static bool auto_dpr = qgetenv("QT_DEVICE_PIXEL_RATIO").toLower() == "auto";
if (override_dpr > 0)
return override_dpr;