diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-09-07 21:22:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-09-12 10:00:10 +0200 |
commit | 0a5a41d9a4f33652f3a0be766b6b9a486075325b (patch) | |
tree | 7119278f0cc2818b4e1fe79489b1bc95a1fa26fe /src | |
parent | d2ba9d09628e1f0548e5a8747b222e713f6f4055 (diff) | |
download | qtbase-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.cpp | 2 |
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); } |