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>
bb10
Marc Mutz 2014-09-09 11:48:24 +02:00
parent dcb48c6dc6
commit 099f188bc8
1 changed files with 1 additions and 1 deletions

View File

@ -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;