From 0a5a41d9a4f33652f3a0be766b6b9a486075325b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 7 Sep 2014 21:22:49 +0200 Subject: QImageReader: use qEnvironmentVariableIsEmpty() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I92805767b55adce478a4bf8eb1cbafaa544f96aa Reviewed-by: Jędrzej Nowacki Reviewed-by: Gunnar Sletta --- src/gui/image/qimagereader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/image') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 3bf002373c..da6161ad0f 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -1291,7 +1291,7 @@ bool QImageReader::read(QImage *image) } // successful read; check for "@2x" file name suffix and set device pixel ratio. - static bool disable2xImageLoading = !qgetenv("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING").isEmpty(); + static bool disable2xImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING"); if (!disable2xImageLoading && QFileInfo(fileName()).baseName().endsWith(QLatin1String("@2x"))) { image->setDevicePixelRatio(2.0); } -- cgit v1.2.1