summaryrefslogtreecommitdiff
path: root/src/declarative/qml/qdeclarativecontext.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-19 17:08:13 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-19 17:08:13 +1000
commit4223acff70de3036c5b7d75bccaec0c540c23556 (patch)
tree3c93c5a22e49b0998725fce10553bae96f036212 /src/declarative/qml/qdeclarativecontext.cpp
parentfae16b674b619b73037841a00577de5922a26595 (diff)
downloadqt4-tools-4223acff70de3036c5b7d75bccaec0c540c23556.tar.gz
Remove Script {} support
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 31430c70be..2041e0a457 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -696,39 +696,6 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
}
}
-void QDeclarativeContextData::addScript(const QDeclarativeParser::Object::ScriptBlock &script,
- QObject *scopeObject)
-{
- if (!engine)
- return;
-
- QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
- QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
-
- QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
-
- scriptContext->pushScope(enginePriv->contextClass->newContext(this, scopeObject));
- scriptContext->pushScope(enginePriv->globalClass->globalObject());
-
- QScriptValue scope = scriptEngine->newObject();
- scriptContext->setActivationObject(scope);
- scriptContext->pushScope(scope);
-
- for (int ii = 0; ii < script.codes.count(); ++ii) {
- scriptEngine->evaluate(script.codes.at(ii), script.files.at(ii), script.lineNumbers.at(ii));
-
- if (scriptEngine->hasUncaughtException()) {
- QDeclarativeError error;
- QDeclarativeExpressionPrivate::exceptionToError(scriptEngine, error);
- enginePriv->warning(error);
- }
- }
-
- scriptEngine->popContext();
-
- scripts.append(scope);
-}
-
void QDeclarativeContextData::setIdProperty(int idx, QObject *obj)
{
idValues[idx] = obj;