summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-07 21:22:49 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-12 10:00:10 +0200
commit0a5a41d9a4f33652f3a0be766b6b9a486075325b (patch)
tree7119278f0cc2818b4e1fe79489b1bc95a1fa26fe /src
parentd2ba9d09628e1f0548e5a8747b222e713f6f4055 (diff)
downloadqtbase-0a5a41d9a4f33652f3a0be766b6b9a486075325b.tar.gz
QImageReader: use qEnvironmentVariableIsEmpty()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I92805767b55adce478a4bf8eb1cbafaa544f96aa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qimagereader.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}