aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 12:35:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 12:40:18 +0000
commit8848abe69fa957d5406659229cecdada83da8421 (patch)
treebec001ed4f959735e5371c1e5b4a55b4784e59c8 /src/qml/jsruntime
parentbef2dc8a236d4062f6b05b10cf99e6d081e4d6ce (diff)
QML: 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(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 82d94f569e..e31d9b1481 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -218,7 +218,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
if (!factory) {
#ifdef V4_ENABLE_JIT
- static const bool forceMoth = !qgetenv("QV4_FORCE_INTERPRETER").isEmpty();
+ static const bool forceMoth = !qEnvironmentVariableIsEmpty("QV4_FORCE_INTERPRETER");
if (forceMoth)
factory = new Moth::ISelFactory;
else