aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-12-31 10:40:16 -0800
committerOleg Shparber <trollixx@gmail.com>2015-01-03 23:29:51 +0100
commit4a9ed3de7d92809cf575f245f55d4f422b4983c3 (patch)
treedf242fa9aa2895cf451096d2384e8f04ce1d0c70
parent21d481c209692ec73ab6b6bc43e6977fc2f8c2fc (diff)
Use QV4::ScopedArrayObject typedef instead of actual type
Change-Id: I975536745ac6c264aca074f84d223fbec7682d3d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/particles/qquickcustomaffector.cpp2
-rw-r--r--src/particles/qquickparticleemitter.cpp2
-rw-r--r--src/particles/qquicktrailemitter.cpp2
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp10
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp4
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp2
-rw-r--r--src/qml/jsruntime/qv4serialize.cpp4
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp2
-rw-r--r--src/qml/qml/qqmllocale.cpp4
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp2
-rw-r--r--src/qml/qml/v8/qv8engine.cpp6
15 files changed, 25 insertions, 25 deletions
diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp
index 874371632e..3fecc83a4e 100644
--- a/src/particles/qquickcustomaffector.cpp
+++ b/src/particles/qquickcustomaffector.cpp
@@ -141,7 +141,7 @@ void QQuickCustomAffector::affectSystem(qreal dt)
QV4::ExecutionEngine *v4 = QV8Engine::getV4(qmlEngine->handle());
QV4::Scope scope(v4);
- QV4::Scoped<QV4::ArrayObject> array(scope, v4->newArrayObject(toAffect.size()));
+ QV4::ScopedArrayObject array(scope, v4->newArrayObject(toAffect.size()));
QV4::ScopedValue v(scope);
for (int i=0; i<toAffect.size(); i++)
array->putIndexed(i, (v = toAffect[i]->v4Value()));
diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp
index 9c7d9facf3..b76e917069 100644
--- a/src/particles/qquickparticleemitter.cpp
+++ b/src/particles/qquickparticleemitter.cpp
@@ -479,7 +479,7 @@ void QQuickParticleEmitter::emitWindow(int timeStamp)
//Done after emitParticle so that the Painter::load is done first, this allows you to customize its static variables
//We then don't need to request another reload, because the first reload isn't scheduled until we get back to the render thread
- QV4::Scoped<QV4::ArrayObject> array(scope, v4->newArrayObject(toEmit.size()));
+ QV4::ScopedArrayObject array(scope, v4->newArrayObject(toEmit.size()));
QV4::ScopedValue v(scope);
for (int i=0; i<toEmit.size(); i++)
array->putIndexed(i, (v = toEmit[i]->v4Value()));
diff --git a/src/particles/qquicktrailemitter.cpp b/src/particles/qquicktrailemitter.cpp
index d948f21820..f27a566653 100644
--- a/src/particles/qquicktrailemitter.cpp
+++ b/src/particles/qquicktrailemitter.cpp
@@ -264,7 +264,7 @@ void QQuickTrailEmitter::emitWindow(int timeStamp)
QV4::ExecutionEngine *v4 = QV8Engine::getV4(qmlEngine->handle());
QV4::Scope scope(v4);
- QV4::Scoped<QV4::ArrayObject> array(scope, v4->newArrayObject(toEmit.size()));
+ QV4::ScopedArrayObject array(scope, v4->newArrayObject(toEmit.size()));
QV4::ScopedValue v(scope);
for (int i=0; i<toEmit.size(); i++)
array->putIndexed(i, (v = toEmit[i]->v4Value()));
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 0a90be9cda..b0676c917b 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -343,7 +343,7 @@ QJSValue QJSEngine::newObject()
QJSValue QJSEngine::newArray(uint length)
{
QV4::Scope scope(d->m_v4Engine);
- QV4::Scoped<QV4::ArrayObject> array(scope, d->m_v4Engine->newArrayObject());
+ QV4::ScopedArrayObject array(scope, d->m_v4Engine->newArrayObject());
if (length < 0x1000)
array->arrayReserve(length);
array->setArrayLengthUnchecked(length);
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index d388875e3b..e2ff0b46e2 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -51,7 +51,7 @@ ReturnedValue ArrayCtor::construct(Managed *m, CallData *callData)
{
ExecutionEngine *v4 = m->engine();
Scope scope(v4);
- Scoped<ArrayObject> a(scope, v4->newArrayObject());
+ ScopedArrayObject a(scope, v4->newArrayObject());
uint len;
if (callData->argc == 1 && callData->args[0].isNumber()) {
bool ok;
@@ -400,7 +400,7 @@ ReturnedValue ArrayPrototype::method_slice(CallContext *ctx)
if (!o)
return Encode::undefined();
- Scoped<ArrayObject> result(scope, ctx->d()->engine->newArrayObject());
+ ScopedArrayObject result(scope, ctx->d()->engine->newArrayObject());
uint len = o->getLength();
double s = ScopedValue(scope, ctx->argument(0))->toInteger();
uint start;
@@ -457,7 +457,7 @@ ReturnedValue ArrayPrototype::method_splice(CallContext *ctx)
return Encode::undefined();
uint len = instance->getLength();
- Scoped<ArrayObject> newArray(scope, ctx->d()->engine->newArrayObject());
+ ScopedArrayObject newArray(scope, ctx->d()->engine->newArrayObject());
double rs = ScopedValue(scope, ctx->argument(0))->toInteger();
uint start;
@@ -793,7 +793,7 @@ ReturnedValue ArrayPrototype::method_map(CallContext *ctx)
if (!callback)
return ctx->engine()->throwTypeError();
- Scoped<ArrayObject> a(scope, ctx->d()->engine->newArrayObject());
+ ScopedArrayObject a(scope, ctx->d()->engine->newArrayObject());
a->arrayReserve(len);
a->setArrayLengthUnchecked(len);
@@ -830,7 +830,7 @@ ReturnedValue ArrayPrototype::method_filter(CallContext *ctx)
if (!callback)
return ctx->engine()->throwTypeError();
- Scoped<ArrayObject> a(scope, ctx->d()->engine->newArrayObject());
+ ScopedArrayObject a(scope, ctx->d()->engine->newArrayObject());
a->arrayReserve(len);
ScopedValue selected(scope);
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 0bd4cec336..53f9d36eac 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -298,7 +298,7 @@ ReturnedValue JsonParser::parseArray()
{
Scope scope(engine);
BEGIN << "parseArray";
- Scoped<ArrayObject> array(scope, engine->newArrayObject());
+ ScopedArrayObject array(scope, engine->newArrayObject());
if (++nestingLevel > nestingLimit) {
lastError = QJsonParseError::DeepNesting;
@@ -1048,7 +1048,7 @@ QV4::ReturnedValue JsonObject::fromJsonArray(ExecutionEngine *engine, const QJso
{
Scope scope(engine);
int size = array.size();
- Scoped<ArrayObject> a(scope, engine->newArrayObject());
+ ScopedArrayObject a(scope, engine->newArrayObject());
a->arrayReserve(size);
ScopedValue v(scope);
for (int i = 0; i < size; i++)
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 4e90f652e4..096647d425 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -371,7 +371,7 @@ ReturnedValue ObjectPrototype::method_keys(CallContext *ctx)
if (!o)
return ctx->engine()->throwTypeError();
- Scoped<ArrayObject> a(scope, ctx->d()->engine->newArrayObject());
+ ScopedArrayObject a(scope, ctx->d()->engine->newArrayObject());
ObjectIterator it(scope, o, ObjectIterator::EnumerableOnly);
ScopedValue name(scope);
@@ -672,7 +672,7 @@ ReturnedValue ObjectPrototype::fromPropertyDescriptor(ExecutionEngine *engine, c
Heap::ArrayObject *ObjectPrototype::getOwnPropertyNames(ExecutionEngine *v4, const ValueRef o)
{
Scope scope(v4);
- Scoped<ArrayObject> array(scope, v4->newArrayObject());
+ ScopedArrayObject array(scope, v4->newArrayObject());
ScopedObject O(scope, o);
if (O) {
ObjectIterator it(scope, O, ObjectIterator::NoFlags);
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index bbd646a72b..021b864c0f 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1703,7 +1703,7 @@ QV4::ReturnedValue CallArgument::toValue(QV8Engine *engine)
// XXX Can this be made more by using Array as a prototype and implementing
// directly against QList<QObject*>?
QList<QObject *> &list = *qlistPtr;
- QV4::Scoped<ArrayObject> array(scope, v4->newArrayObject());
+ QV4::ScopedArrayObject array(scope, v4->newArrayObject());
array->arrayReserve(list.count());
QV4::ScopedValue v(scope);
for (int ii = 0; ii < list.count(); ++ii)
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index fcbf91c3b0..31dd6af2a7 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -380,7 +380,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
}
// fill in result data
- Scoped<ArrayObject> array(scope, scope.engine->newArrayObject(scope.engine->regExpExecArrayClass, scope.engine->arrayPrototype.asObject()));
+ ScopedArrayObject array(scope, scope.engine->newArrayObject(scope.engine->regExpExecArrayClass, scope.engine->arrayPrototype.asObject()));
int len = r->value()->captureCount();
array->arrayReserve(len);
ScopedValue v(scope);
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 079b147840..c045655da9 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1186,7 +1186,7 @@ void Runtime::declareVar(ExecutionEngine *engine, bool deletable, int nameIndex)
ReturnedValue Runtime::arrayLiteral(ExecutionEngine *engine, Value *values, uint length)
{
Scope scope(engine);
- Scoped<ArrayObject> a(scope, engine->newArrayObject());
+ ScopedArrayObject a(scope, engine->newArrayObject());
if (length) {
a->arrayReserve(length);
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index 8d06927715..3d368375bd 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -312,7 +312,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
case WorkerArray:
{
quint32 size = headersize(header);
- Scoped<ArrayObject> a(scope, engine->newArrayObject());
+ ScopedArrayObject a(scope, engine->newArrayObject());
ScopedValue v(scope);
for (quint32 ii = 0; ii < size; ++ii) {
v = deserialize(data, engine);
@@ -375,7 +375,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
quint32 seqLength = length - 1;
value = deserialize(data, engine);
int sequenceType = value->integerValue();
- Scoped<ArrayObject> array(scope, engine->newArrayObject());
+ ScopedArrayObject array(scope, engine->newArrayObject());
array->arrayReserve(seqLength);
for (quint32 ii = 0; ii < seqLength; ++ii) {
value = deserialize(data, engine);
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index df6c8c44a5..5fc6b884d0 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -397,7 +397,7 @@ ReturnedValue StringPrototype::method_match(CallContext *context)
ScopedString lastIndex(scope, context->d()->engine->newString(QStringLiteral("lastIndex")));
rx->put(lastIndex, ScopedValue(scope, Primitive::fromInt32(0)));
- Scoped<ArrayObject> a(scope, context->d()->engine->newArrayObject());
+ ScopedArrayObject a(scope, context->d()->engine->newArrayObject());
double previousLastIndex = 0;
uint n = 0;
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index bc7b651c93..ce6b956fe6 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -493,7 +493,7 @@ QV4::ReturnedValue QQmlLocaleData::method_get_weekDays(QV4::CallContext *ctx)
QList<Qt::DayOfWeek> days = locale->weekdays();
- QV4::Scoped<QV4::ArrayObject> result(scope, ctx->d()->engine->newArrayObject());
+ QV4::ScopedArrayObject result(scope, ctx->d()->engine->newArrayObject());
result->arrayReserve(days.size());
for (int i = 0; i < days.size(); ++i) {
int day = days.at(i);
@@ -514,7 +514,7 @@ QV4::ReturnedValue QQmlLocaleData::method_get_uiLanguages(QV4::CallContext *ctx)
return QV4::Encode::undefined();
QStringList langs = locale->uiLanguages();
- QV4::Scoped<QV4::ArrayObject> result(scope, ctx->d()->engine->newArrayObject());
+ QV4::ScopedArrayObject result(scope, ctx->d()->engine->newArrayObject());
result->arrayReserve(langs.size());
QV4::ScopedValue v(scope);
for (int i = 0; i < langs.size(); ++i)
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 68dabfb203..8d032d9834 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -926,7 +926,7 @@ ReturnedValue QtObject::method_createQmlObject(CallContext *ctx)
Scope scope(v4);
QString errorstr = QLatin1String("Qt.createQmlObject(): failed to create object: ");
- QV4::Scoped<ArrayObject> qmlerrors(scope, v4->newArrayObject());
+ QV4::ScopedArrayObject qmlerrors(scope, v4->newArrayObject());
QV4::ScopedObject qmlerror(scope);
QV4::ScopedString s(scope);
QV4::ScopedValue v(scope);
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 81e4c71149..fa9fb6c41d 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -309,7 +309,7 @@ QVariant QV8Engine::objectToVariant(QV4::ExecutionEngine *e, QV4::Object *o, V8O
static QV4::ReturnedValue arrayFromVariantList(QV4::ExecutionEngine *e, const QVariantList &list)
{
QV4::Scope scope(e);
- QV4::Scoped<QV4::ArrayObject> a(scope, e->newArrayObject());
+ QV4::ScopedArrayObject a(scope, e->newArrayObject());
int len = list.count();
a->arrayReserve(len);
QV4::ScopedValue v(scope);
@@ -431,7 +431,7 @@ QV4::ReturnedValue QV8Engine::fromVariant(QV4::ExecutionEngine *e, const QVarian
// XXX Can this be made more by using Array as a prototype and implementing
// directly against QList<QObject*>?
const QList<QObject *> &list = *(QList<QObject *>*)ptr;
- QV4::Scoped<QV4::ArrayObject> a(scope, e->newArrayObject());
+ QV4::ScopedArrayObject a(scope, e->newArrayObject());
a->arrayReserve(list.count());
QV4::ScopedValue v(scope);
for (int ii = 0; ii < list.count(); ++ii)
@@ -591,7 +591,7 @@ QV4::ReturnedValue QV8Engine::global()
QV4::ReturnedValue QV8Engine::variantListToJS(const QVariantList &lst)
{
QV4::Scope scope(m_v4Engine);
- QV4::Scoped<QV4::ArrayObject> a(scope, m_v4Engine->newArrayObject());
+ QV4::ScopedArrayObject a(scope, m_v4Engine->newArrayObject());
a->arrayReserve(lst.size());
QV4::ScopedValue v(scope);
for (int i = 0; i < lst.size(); i++)