summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbasicscript.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-08-07 06:20:30 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-08-07 06:25:28 (GMT)
commitef178f4d7d7545920bf8dbc8f43d571ffd9ddf09 (patch)
treeb4ceba65f647554fa9efa2c5baa77222f5aa13f7 /src/declarative/qml/qmlbasicscript.cpp
parent970dae1b8d9b9a668406fd3a77bf3e3847e077eb (diff)
downloadQt-ef178f4d7d7545920bf8dbc8f43d571ffd9ddf09.zip
Qt-ef178f4d7d7545920bf8dbc8f43d571ffd9ddf09.tar.gz
Qt-ef178f4d7d7545920bf8dbc8f43d571ffd9ddf09.tar.bz2
Remove unused parameters
Diffstat (limited to 'src/declarative/qml/qmlbasicscript.cpp')
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp48
1 files changed, 3 insertions, 45 deletions
diff --git a/src/declarative/qml/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index ca137c7..5800f71 100644
--- a/src/declarative/qml/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -243,12 +243,7 @@ struct QmlBasicScriptCompiler
To see if the QmlBasicScript engine can handle a binding, call compile()
and check the return value, or isValid() afterwards.
- To evaluate the binding, the QmlBasicScript instance needs some memory in
- which to cache state. This may be allocated by calling newScriptState()
- and destroyed by calling deleteScriptState(). The state data is then passed
- to the run() method when evaluating the binding.
-
- To further accelerate binding, QmlBasicScript can return a precompiled
+ To accelerate binding, QmlBasicScript can return a precompiled
version of itself that can be saved for future use. Call compileData() to
get an opaque pointer to the compiled state, and compileDataSize() for the
size of this data in bytes. This data can be saved and passed to future
@@ -320,22 +315,6 @@ void QmlBasicScript::clear()
}
/*!
- Return the script state memory for this script instance. This memory should
- only be destroyed by calling deleteScriptState().
- */
-void *QmlBasicScript::newScriptState()
-{
- return 0;
-}
-
-/*!
- Delete the \a data previously allocated by newScriptState().
- */
-void QmlBasicScript::deleteScriptState(void *)
-{
-}
-
-/*!
Dump the script instructions to stderr for debugging.
*/
void QmlBasicScript::dump()
@@ -635,23 +614,10 @@ bool QmlBasicScriptCompiler::compileBinaryExpression(AST::Node *node)
}
/*!
- \enum QmlBasicScript::CacheState
- \value NoChange The query has not change. Any previous monitoring is still
- valid.
- \value Incremental The query has been incrementally changed. Any previous
- monitoring is still valid, but needs to have the fresh properties added to
- it.
- \value Reset The entire query has been reset from the beginning. Any previous
- monitoring is now invalid.
-*/
-
-/*!
- Run the script in \a context and return the result. \a voidCache should
- contain state memory previously acquired from newScript.
+ Run the script in \a context and return the result.
*/
-QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *cached)
+QVariant QmlBasicScript::run(QmlContext *context)
{
- Q_UNUSED(voidCache);
if (!isValid())
return QVariant();
@@ -660,8 +626,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
QStack<QVariant> stack;
- CacheState state = NoChange;
-
for (int idx = 0; idx < d->instructionCount; ++idx) {
const ScriptInstruction &instr = d->instructions()[idx];
@@ -671,7 +635,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
stack.push(QVariant::fromValue(contextPrivate->idValues[instr.fetch.idx].data()));
enginePrivate->capturedProperties <<
QmlEnginePrivate::CapturedProperty(context, -1, contextPrivate->notifyIndex + instr.fetch.idx);
- state = Reset;
}
break;
@@ -683,7 +646,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
if (obj && instr.constant.notify != 0)
enginePrivate->capturedProperties <<
QmlEnginePrivate::CapturedProperty(obj, instr.constant.idx, instr.constant.notify);
- state = Reset;
}
break;
@@ -695,7 +657,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
if (obj && instr.constant.notify != 0)
enginePrivate->capturedProperties <<
QmlEnginePrivate::CapturedProperty(obj, instr.constant.idx, instr.constant.notify);
- state = Reset;
}
break;
@@ -708,7 +669,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
if (obj && instr.constant.notify != 0)
enginePrivate->capturedProperties <<
QmlEnginePrivate::CapturedProperty(obj, instr.constant.idx, instr.constant.notify);
- state = Reset;
}
break;
@@ -733,8 +693,6 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
}
}
- *cached = Reset;
-
if (stack.isEmpty())
return QVariant();
else