diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-16 03:21:33 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-16 03:21:33 (GMT) |
commit | c9fd96774ced98da4145259d132a2c305dd3e6a9 (patch) | |
tree | 92bb605c710595018719132dd20008dddde95d8a /src/declarative/qml/qmlbasicscript.cpp | |
parent | a6b7a8a5fb49acc957599111be222769e6b34521 (diff) | |
download | Qt-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.cpp | 4 |
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; |