aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/jsextensions/moduleproperties.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/jsextensions/moduleproperties.cpp b/src/lib/corelib/jsextensions/moduleproperties.cpp
index bed72ee55..5780ad401 100644
--- a/src/lib/corelib/jsextensions/moduleproperties.cpp
+++ b/src/lib/corelib/jsextensions/moduleproperties.cpp
@@ -142,7 +142,8 @@ QScriptValue ModuleProperties::moduleProperties(QScriptContext *context, QScript
// Cache the variant value. We must not cache the QScriptValue here, because it's a
// reference and the user might change the actual object.
- qbsEngine->addToPropertyCache(moduleName, propertyName, oneValue, properties, value);
+ if (qbsEngine->isPropertyCacheEnabled())
+ qbsEngine->addToPropertyCache(moduleName, propertyName, oneValue, properties, value);
}
return engine->toScriptValue(value);
}