summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbasicscript.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-06-16 03:21:33 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-06-16 03:21:33 (GMT)
commitc9fd96774ced98da4145259d132a2c305dd3e6a9 (patch)
tree92bb605c710595018719132dd20008dddde95d8a /src/declarative/qml/qmlbasicscript.cpp
parenta6b7a8a5fb49acc957599111be222769e6b34521 (diff)
downloadQt-c9fd96774ced98da4145259d132a2c305dd3e6a9.zip
Qt-c9fd96774ced98da4145259d132a2c305dd3e6a9.tar.gz
Qt-c9fd96774ced98da4145259d132a2c305dd3e6a9.tar.bz2
Invalidate the cache if the script resets
Diffstat (limited to 'src/declarative/qml/qmlbasicscript.cpp')
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index dd6766e..a679532 100644
--- a/src/declarative/qml/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -828,7 +828,7 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
if (instr.type == ScriptInstruction::Load) {
- if (n.type == QmlBasicScriptNodeCache::Invalid) {
+ if (n.type == QmlBasicScriptNodeCache::Invalid || state == Reset) {
context->engine()->d_func()->loadCache(n, QLatin1String(id), static_cast<QmlContextPrivate*>(context->d_ptr));
state = Incremental;
}
@@ -852,7 +852,7 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
CacheState dummy;
return run(context, voidCache, &dummy);
}
- } else if (n.type == QmlBasicScriptNodeCache::Invalid) {
+ } else if (n.type == QmlBasicScriptNodeCache::Invalid || state == Reset) {
context->engine()->d_func()->fetchCache(n, QLatin1String(id), obj);
guard(n);
state = Incremental;