diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-22 12:36:18 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-26 10:26:02 +0000 |
commit | f9fae251ca07401ee1b0039edc6ea6b7a522b5a7 (patch) | |
tree | 2dff3c7006f5a00ab6791a0e932109807a217ab4 /src/quick/util/qquickpixmapcache.cpp | |
parent | 901b88c6ae6c476a8ad9825d9020325a9a58ab61 (diff) |
Quick: Sanitize reading environment variables.
Where possible, use qEnvironmentVariableIsSet()/
qEnvironmentVariableIsEmpty() instead of checking on the
return value of qgetenv().
Where the value is required, add a check using one of
qEnvironmentVariableIsSet()/Empty().
Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp
for reuse as qt_sg_envInt() and add qt_sg_envFloat().
Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 0b7b5ce9a8..ed6da8ac91 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_DEBUG -static bool qsg_leak_check = !qgetenv("QML_LEAK_CHECK").isEmpty(); +static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK"); #endif // The cache limit describes the maximum "junk" in the cache. |