aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-09-23 12:06:00 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-09-25 18:53:38 +0000
commiteac632c43f16d146852f00c50a203fdf5fa3a2a0 (patch)
tree0aa2c3b92018d539ee6b4a9d9e0283a9fa30e5d1 /src/qml/qml/qqmlvmemetaobject.cpp
parentd0ebfd86813b99253d0ae42a417c59d795f16ac5 (diff)
Cleanups
Remove some unused code Change-Id: I1d6612649cf279834f9ce92da60a85495389555e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index a0e1d79f93..54b5f2da0d 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -148,7 +148,7 @@ QAbstractDynamicMetaObject *QQmlVMEMetaObject::toDynamicMetaObject(QObject *o)
QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
QQmlPropertyCache *cache,
- const QQmlVMEMetaData *meta, QV4::ExecutionContext *qmlBindingContext, QQmlCompiledData *compiledData)
+ const QQmlVMEMetaData *meta)
: object(obj),
ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta),
hasAssignedMetaObjectData(false), aliasEndpoints(0),
@@ -186,21 +186,6 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
if (needsJSWrapper)
ensureQObjectWrapper();
-
- if (qmlBindingContext && metaData->methodCount) {
- methods = new QV4::PersistentValue[metaData->methodCount];
-
- QV4::CompiledData::CompilationUnit *compilationUnit = compiledData->compilationUnit;
- QV4::Scope scope(cache->engine);
- QV4::ScopedObject o(scope);
- for (int index = 0; index < metaData->methodCount; ++index) {
- QQmlVMEMetaData::MethodData *data = metaData->methodData() + index;
-
- QV4::Function *runtimeFunction = compilationUnit->runtimeFunctions[data->runtimeFunctionIndex];
- o = QV4::FunctionObject::createScriptFunction(qmlBindingContext, runtimeFunction);
- methods[index].set(qmlBindingContext->engine(), o);
- }
- }
}
QQmlVMEMetaObject::~QQmlVMEMetaObject()
@@ -850,11 +835,11 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index)
{
if (!ctxt || !ctxt->isValid()) {
qWarning("QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context");
- return QV4::Primitive::undefinedValue().asReturnedValue();
+ return QV4::Encode::undefined();
}
if (!methods)
- methods = new QV4::PersistentValue[metaData->methodCount];
+ return QV4::Encode::undefined();
return methods[index].value();
}