aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-15 21:28:01 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 12:30:35 +0100
commit3dbf4e9a6979802fff55e2f5e6aa54a14280e128 (patch)
tree2bd9090f4bcf01e9c9e43c0d52fcbf80295ca6c0 /src/qml/jsapi
parent3f3652e43fc001df728ef00403b18d3202e2726a (diff)
Cleanups
Remove duplicated methods. Remove some mostly unused methods, and simplify some others. Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine.cpp10
-rw-r--r--src/qml/jsapi/qjsvalue.cpp10
-rw-r--r--src/qml/jsapi/qjsvalueiterator.cpp2
3 files changed, 11 insertions, 11 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 413e0eedaf..321a659d38 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -323,7 +323,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in
result = v4->catchException();
if (ctx->d() != v4->rootContext())
v4->popContext();
- return QJSValue(v4, result.asReturnedValue());
+ return QJSValue(v4, result->asReturnedValue());
}
/*!
@@ -338,7 +338,7 @@ QJSValue QJSEngine::newObject()
{
QV4::Scope scope(d->m_v4Engine);
QV4::ScopedValue v(scope, d->m_v4Engine->newObject());
- return QJSValue(d->m_v4Engine, v.asReturnedValue());
+ return QJSValue(d->m_v4Engine, v->asReturnedValue());
}
/*!
@@ -387,7 +387,7 @@ QJSValue QJSEngine::newQObject(QObject *object)
QQmlEngine::setObjectOwnership(object, QQmlEngine::JavaScriptOwnership);
}
QV4::ScopedValue v(scope, QV4::QObjectWrapper::wrap(v4, object));
- return QJSValue(v4, v.asReturnedValue());
+ return QJSValue(v4, v->asReturnedValue());
}
/*!
@@ -405,7 +405,7 @@ QJSValue QJSEngine::globalObject() const
Q_D(const QJSEngine);
QV4::Scope scope(d->m_v4Engine);
QV4::ScopedValue v(scope, d->m_v4Engine->globalObject());
- return QJSValue(d->m_v4Engine, v.asReturnedValue());
+ return QJSValue(d->m_v4Engine, v->asReturnedValue());
}
/*!
@@ -417,7 +417,7 @@ QJSValue QJSEngine::create(int type, const void *ptr)
Q_D(QJSEngine);
QV4::Scope scope(d->m_v4Engine);
QV4::ScopedValue v(scope, scope.engine->metaTypeToJS(type, ptr));
- return QJSValue(d->m_v4Engine, v.asReturnedValue());
+ return QJSValue(d->m_v4Engine, v->asReturnedValue());
}
/*!
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp
index d57b8dcc16..54480abe88 100644
--- a/src/qml/jsapi/qjsvalue.cpp
+++ b/src/qml/jsapi/qjsvalue.cpp
@@ -648,7 +648,7 @@ QJSValue QJSValue::call(const QJSValueList &args)
if (engine->hasException)
result = engine->catchException();
- return QJSValue(engine, result.asReturnedValue());
+ return QJSValue(engine, result->asReturnedValue());
}
/*!
@@ -704,7 +704,7 @@ QJSValue QJSValue::callWithInstance(const QJSValue &instance, const QJSValueList
if (engine->hasException)
result = engine->catchException();
- return QJSValue(engine, result.asReturnedValue());
+ return QJSValue(engine, result->asReturnedValue());
}
/*!
@@ -752,7 +752,7 @@ QJSValue QJSValue::callAsConstructor(const QJSValueList &args)
if (engine->hasException)
result = engine->catchException();
- return QJSValue(engine, result.asReturnedValue());
+ return QJSValue(engine, result->asReturnedValue());
}
#ifdef QT_DEPRECATED
@@ -1001,7 +1001,7 @@ QJSValue QJSValue::property(const QString& name) const
if (engine->hasException)
result = engine->catchException();
- return QJSValue(engine, result.asReturnedValue());
+ return QJSValue(engine, result->asReturnedValue());
}
/*!
@@ -1030,7 +1030,7 @@ QJSValue QJSValue::property(quint32 arrayIndex) const
QV4::ScopedValue result(scope, arrayIndex == UINT_MAX ? o->get(engine->id_uintMax) : o->getIndexed(arrayIndex));
if (engine->hasException)
engine->catchException();
- return QJSValue(engine, result.asReturnedValue());
+ return QJSValue(engine, result->asReturnedValue());
}
/*!
diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp
index 968864fbc6..03e9fbc77e 100644
--- a/src/qml/jsapi/qjsvalueiterator.cpp
+++ b/src/qml/jsapi/qjsvalueiterator.cpp
@@ -200,7 +200,7 @@ QJSValue QJSValueIterator::value() const
engine->catchException();
return QJSValue();
}
- return QJSValue(engine, v.asReturnedValue());
+ return QJSValue(engine, v->asReturnedValue());
}