aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-05-08 16:22:39 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-05-08 19:57:01 +0200
commit995d65f3f4f348757363ba2a3a3c3444aa281b4e (patch)
treecae5c176847609abc33f51c065aa38b38cd6b9b9 /src/qml
parent2b0d3bf812273e762e7aa27a58909ade59590c0f (diff)
Cleanup v8 dependencies from QQmlV8Function
... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp38
-rw-r--r--src/qml/qml/qqmlcomponent.h6
-rw-r--r--src/qml/qml/v8/qv8engine_p.h41
-rw-r--r--src/qml/qml/v8/qv8qobjectwrapper.cpp11
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp46
-rw-r--r--src/qml/types/qqmldelegatemodel_p.h18
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h2
-rw-r--r--src/qml/types/qqmllistmodel.cpp16
-rw-r--r--src/qml/types/qqmllistmodel_p.h6
-rw-r--r--src/qml/types/qqmllistmodelworkeragent.cpp6
-rw-r--r--src/qml/types/qqmllistmodelworkeragent_p.h6
-rw-r--r--src/qml/types/qquickworkerscript.cpp4
-rw-r--r--src/qml/types/qquickworkerscript_p.h4
13 files changed, 102 insertions, 102 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 52777b023f..471d5fca8b 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1177,7 +1177,7 @@ static void QQmlComponent_setQmlParent(QObject *me, QObject *parent)
/*!
\internal
*/
-void QQmlComponent::createObject(QQmlV8Function *args)
+void QQmlComponent::createObject(QQmlV4Function *args)
{
Q_D(QQmlComponent);
Q_ASSERT(d->engine);
@@ -1186,14 +1186,14 @@ void QQmlComponent::createObject(QQmlV8Function *args)
QObject *parent = 0;
v8::Handle<v8::Object> valuemap;
- if (args->Length() >= 1)
- parent = args->engine()->toQObject((*args)[0]->v4Value());
+ if (args->length() >= 1)
+ parent = args->engine()->toQObject((*args)[0]);
- if (args->Length() >= 2) {
+ if (args->length() >= 2) {
v8::Handle<v8::Value> v = (*args)[1];
if (!v->IsObject() || v->IsArray()) {
qmlInfo(this) << tr("createObject: value is not an object");
- args->returnValue(QV4::Value::nullValue());
+ args->setReturnValue(QV4::Value::nullValue());
return;
}
valuemap = v8::Handle<v8::Object>::Cast(v);
@@ -1208,7 +1208,7 @@ void QQmlComponent::createObject(QQmlV8Function *args)
QObject *rv = beginCreate(ctxt);
if (!rv) {
- args->returnValue(QV4::Value::nullValue());
+ args->setReturnValue(QV4::Value::nullValue());
return;
}
@@ -1220,7 +1220,7 @@ void QQmlComponent::createObject(QQmlV8Function *args)
if (!valuemap.IsEmpty()) {
QQmlComponentExtension *e = componentExtension(v8engine);
- QV4::Value f = v8engine->evaluateScript(QString::fromLatin1(INITIALPROPERTIES_SOURCE), args->qmlGlobal()->v4Value().asObject());
+ QV4::Value f = v8engine->evaluateScript(QString::fromLatin1(INITIALPROPERTIES_SOURCE), args->qmlGlobal().asObject());
QV4::Value args[] = { object->v4Value(), valuemap->v4Value() };
f.asFunctionObject()->call(v4engine->current, QV4::Value::fromObject(v4engine->globalObject), args, 2);
}
@@ -1232,9 +1232,9 @@ void QQmlComponent::createObject(QQmlV8Function *args)
QQmlData::get(rv)->indestructible = false;
if (!rv)
- args->returnValue(QV4::Value::nullValue());
+ args->setReturnValue(QV4::Value::nullValue());
else
- args->returnValue(object);
+ args->setReturnValue(object->v4Value());
}
/*!
@@ -1296,7 +1296,7 @@ void QQmlComponent::createObject(QQmlV8Function *args)
/*!
\internal
*/
-void QQmlComponent::incubateObject(QQmlV8Function *args)
+void QQmlComponent::incubateObject(QQmlV4Function *args)
{
Q_D(QQmlComponent);
Q_ASSERT(d->engine);
@@ -1307,23 +1307,23 @@ void QQmlComponent::incubateObject(QQmlV8Function *args)
v8::Handle<v8::Object> valuemap;
QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous;
- if (args->Length() >= 1)
- parent = args->engine()->toQObject((*args)[0]->v4Value());
+ if (args->length() >= 1)
+ parent = args->engine()->toQObject((*args)[0]);
- if (args->Length() >= 2) {
+ if (args->length() >= 2) {
v8::Handle<v8::Value> v = (*args)[1];
if (v->IsNull()) {
} else if (!v->IsObject() || v->IsArray()) {
qmlInfo(this) << tr("createObject: value is not an object");
- args->returnValue(QV4::Value::nullValue());
+ args->setReturnValue(QV4::Value::nullValue());
return;
} else {
valuemap = v8::Handle<v8::Object>::Cast(v);
}
}
- if (args->Length() >= 3) {
- quint32 v = (*args)[2]->Uint32Value();
+ if (args->length() >= 3) {
+ quint32 v = (*args)[2].toUInt32();
if (v == 0)
mode = QQmlIncubator::Asynchronous;
else if (v == 1)
@@ -1338,7 +1338,7 @@ void QQmlComponent::incubateObject(QQmlV8Function *args)
if (!valuemap.IsEmpty()) {
r->valuemap = valuemap->v4Value();
- r->qmlGlobal = args->qmlGlobal()->v4Value();
+ r->qmlGlobal = args->qmlGlobal();
}
r->parent = parent;
r->me = o->v4Value();
@@ -1347,9 +1347,9 @@ void QQmlComponent::incubateObject(QQmlV8Function *args)
if (r->status() == QQmlIncubator::Null) {
r->dispose();
- args->returnValue(QV4::Value::nullValue());
+ args->setReturnValue(QV4::Value::nullValue());
} else {
- args->returnValue(o);
+ args->setReturnValue(o->v4Value());
}
}
diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h
index aefad475b4..9877f59fb6 100644
--- a/src/qml/qml/qqmlcomponent.h
+++ b/src/qml/qml/qqmlcomponent.h
@@ -56,7 +56,7 @@ class QByteArray;
class QQmlEngine;
class QQmlComponent;
class QQmlIncubator;
-class QQmlV8Function;
+class QQmlV4Function;
class QQmlCompiledData;
class QQmlComponentPrivate;
class QQmlComponentAttached;
@@ -120,8 +120,8 @@ Q_SIGNALS:
protected:
QQmlComponent(QQmlComponentPrivate &dd, QObject* parent);
- Q_INVOKABLE void createObject(QQmlV8Function *);
- Q_INVOKABLE void incubateObject(QQmlV8Function *);
+ Q_INVOKABLE void createObject(QQmlV4Function *);
+ Q_INVOKABLE void incubateObject(QQmlV4Function *);
private:
QQmlComponent(QQmlEngine *, QQmlCompiledData *, int, QObject *parent);
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index 9781375657..7473a71937 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -80,6 +80,7 @@
#include "qv8sequencewrapper_p.h"
#include "qv4jsonwrapper_p.h"
#include <private/qv4value_p.h>
+#include <private/qv4object_p.h>
QT_BEGIN_NAMESPACE
@@ -174,32 +175,32 @@ inline T *v8_resource_check(v8::Handle<v8::Object> object) {
// valid during the call. If the return value isn't set within myMethod(), the will return
// undefined.
class QV8Engine;
-class QQmlV8Function
+class QQmlV4Function
{
public:
- int Length() const { return _ac; }
- v8::Handle<v8::Value> operator[](int idx) { return (*_a)->Get(idx); }
- QQmlContextData *context() { return _c; }
- v8::Handle<v8::Object> qmlGlobal() { return *_g; }
- void returnValue(v8::Handle<v8::Value> rv) { *_r = rv; }
- QV8Engine *engine() const { return _e; }
+ int length() const { return argc; }
+ QV4::Value operator[](int idx) { return args.asObject()->getIndexed(idx); }
+ QQmlContextData *context() { return ctx; }
+ QV4::Value qmlGlobal() { return global; }
+ void setReturnValue(const QV4::Value &rv) { *retVal = rv; }
+ QV8Engine *engine() const { return e; }
private:
friend class QV8QObjectWrapper;
- QQmlV8Function();
- QQmlV8Function(const QQmlV8Function &);
- QQmlV8Function &operator=(const QQmlV8Function &);
+ QQmlV4Function();
+ QQmlV4Function(const QQmlV4Function &);
+ QQmlV4Function &operator=(const QQmlV4Function &);
- QQmlV8Function(int length, v8::Handle<v8::Object> &args,
- v8::Handle<v8::Value> &rv, v8::Handle<v8::Object> &global,
+ QQmlV4Function(int length, const QV4::Value &args,
+ QV4::Value *rv, const QV4::Value &global,
QQmlContextData *c, QV8Engine *e)
- : _ac(length), _a(&args), _r(&rv), _g(&global), _c(c), _e(e) {}
-
- int _ac;
- v8::Handle<v8::Object> *_a;
- v8::Handle<v8::Value> *_r;
- v8::Handle<v8::Object> *_g;
- QQmlContextData *_c;
- QV8Engine *_e;
+ : argc(length), args(args), retVal(rv), global(global), ctx(c), e(e) {}
+
+ int argc;
+ QV4::Value args;
+ QV4::Value *retVal;
+ QV4::Value global;
+ QQmlContextData *ctx;
+ QV8Engine *e;
};
class Q_QML_PRIVATE_EXPORT QQmlV4Handle
diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp
index d998c25236..a0d866b6ac 100644
--- a/src/qml/qml/v8/qv8qobjectwrapper.cpp
+++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp
@@ -2018,19 +2018,18 @@ QV4::Value QV8QObjectWrapper::Invoke(const v8::Arguments &args)
}
if (method.isV8Function()) {
- v8::Handle<v8::Value> rv;
- v8::Handle<v8::Object> qmlglobal = args[2]->ToObject();
+ QV4::Value rv = QV4::Value::undefinedValue();
+ v8::Handle<v8::Value> qmlglobal = args[2];
- QQmlV8Function func(argCount, arguments, rv, qmlglobal,
+ QQmlV4Function func(argCount, arguments->v4Value(), &rv, qmlglobal->v4Value(),
resource->engine->contextWrapper()->context(qmlglobal),
resource->engine);
- QQmlV8Function *funcptr = &func;
+ QQmlV4Function *funcptr = &func;
void *args[] = { 0, &funcptr };
QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, method.coreIndex, args);
- if (rv.IsEmpty()) return QV4::Value::undefinedValue();
- return rv->v4Value();
+ return rv;
}
CallArgs callArgs(argCount, &arguments);
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 4d0f17489c..6242af8fcd 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -2397,7 +2397,7 @@ bool QQmlDelegateModelGroupPrivate::parseIndex(
items that are later replaced by actual data.
*/
-void QQmlDelegateModelGroup::insert(QQmlV8Function *args)
+void QQmlDelegateModelGroup::insert(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(d->model);
@@ -2405,7 +2405,7 @@ void QQmlDelegateModelGroup::insert(QQmlV8Function *args)
int index = model->m_compositor.count(d->group);
Compositor::Group group = d->group;
- if (args->Length() == 0)
+ if (args->length() == 0)
return;
int i = 0;
@@ -2415,7 +2415,7 @@ void QQmlDelegateModelGroup::insert(QQmlV8Function *args)
qmlInfo(this) << tr("insert: index out of range");
return;
}
- if (++i == args->Length())
+ if (++i == args->length())
return;
v = (*args)[i];
}
@@ -2425,7 +2425,7 @@ void QQmlDelegateModelGroup::insert(QQmlV8Function *args)
: model->m_compositor.end();
int groups = 1 << d->group;
- if (++i < args->Length())
+ if (++i < args->length())
groups |= model->m_cacheMetaType->parseGroups((*args)[i]);
if (v->IsArray()) {
@@ -2453,13 +2453,13 @@ void QQmlDelegateModelGroup::insert(QQmlV8Function *args)
group remain instantiated when not referenced by any view.
*/
-void QQmlDelegateModelGroup::create(QQmlV8Function *args)
+void QQmlDelegateModelGroup::create(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
if (!d->model)
return;
- if (args->Length() == 0)
+ if (args->length() == 0)
return;
QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(d->model);
@@ -2472,11 +2472,11 @@ void QQmlDelegateModelGroup::create(QQmlV8Function *args)
if (d->parseIndex(v, &index, &group))
++i;
- if (i < args->Length() && index >= 0 && index <= model->m_compositor.count(group)) {
+ if (i < args->length() && index >= 0 && index <= model->m_compositor.count(group)) {
v = (*args)[i];
if (v->IsObject()) {
int groups = 1 << d->group;
- if (++i < args->Length())
+ if (++i < args->length())
groups |= model->m_cacheMetaType->parseGroups((*args)[i]);
Compositor::insert_iterator before = index < model->m_compositor.count(group)
@@ -2505,7 +2505,7 @@ void QQmlDelegateModelGroup::create(QQmlV8Function *args)
model->m_cache.at(it.cacheIndex)->releaseObject();
}
- args->returnValue(args->engine()->newQObject(object));
+ args->setReturnValue(args->engine()->newQObject(object));
model->emitChanges();
}
@@ -2525,7 +2525,7 @@ void QQmlDelegateModelGroup::create(QQmlV8Function *args)
that the previously unresolved item has simply moved.
*/
-void QQmlDelegateModelGroup::resolve(QQmlV8Function *args)
+void QQmlDelegateModelGroup::resolve(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
if (!d->model)
@@ -2533,7 +2533,7 @@ void QQmlDelegateModelGroup::resolve(QQmlV8Function *args)
QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(d->model);
- if (args->Length() < 2)
+ if (args->length() < 2)
return;
int from = -1;
@@ -2625,7 +2625,7 @@ void QQmlDelegateModelGroup::resolve(QQmlV8Function *args)
Removes \a count items starting at \a index from the group.
*/
-void QQmlDelegateModelGroup::remove(QQmlV8Function *args)
+void QQmlDelegateModelGroup::remove(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
if (!d->model)
@@ -2634,7 +2634,7 @@ void QQmlDelegateModelGroup::remove(QQmlV8Function *args)
int index = -1;
int count = 1;
- if (args->Length() == 0)
+ if (args->length() == 0)
return;
int i = 0;
@@ -2644,7 +2644,7 @@ void QQmlDelegateModelGroup::remove(QQmlV8Function *args)
return;
}
- if (++i < args->Length()) {
+ if (++i < args->length()) {
v = (*args)[i];
if (v->IsInt32())
count = v->Int32Value();
@@ -2664,12 +2664,12 @@ void QQmlDelegateModelGroup::remove(QQmlV8Function *args)
}
bool QQmlDelegateModelGroupPrivate::parseGroupArgs(
- QQmlV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const
+ QQmlV4Function *args, Compositor::Group *group, int *index, int *count, int *groups) const
{
if (!model || !QQmlDelegateModelPrivate::get(model)->m_cacheMetaType)
return false;
- if (args->Length() < 2)
+ if (args->length() < 2)
return false;
int i = 0;
@@ -2681,7 +2681,7 @@ bool QQmlDelegateModelGroupPrivate::parseGroupArgs(
if (v->IsInt32()) {
*count = v->Int32Value();
- if (++i == args->Length())
+ if (++i == args->length())
return false;
v = (*args)[i];
}
@@ -2697,7 +2697,7 @@ bool QQmlDelegateModelGroupPrivate::parseGroupArgs(
Adds \a count items starting at \a index to \a groups.
*/
-void QQmlDelegateModelGroup::addGroups(QQmlV8Function *args)
+void QQmlDelegateModelGroup::addGroups(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
Compositor::Group group = d->group;
@@ -2727,7 +2727,7 @@ void QQmlDelegateModelGroup::addGroups(QQmlV8Function *args)
Removes \a count items starting at \a index from \a groups.
*/
-void QQmlDelegateModelGroup::removeGroups(QQmlV8Function *args)
+void QQmlDelegateModelGroup::removeGroups(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
Compositor::Group group = d->group;
@@ -2757,7 +2757,7 @@ void QQmlDelegateModelGroup::removeGroups(QQmlV8Function *args)
Sets the \a groups \a count items starting at \a index belong to.
*/
-void QQmlDelegateModelGroup::setGroups(QQmlV8Function *args)
+void QQmlDelegateModelGroup::setGroups(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
Compositor::Group group = d->group;
@@ -2793,11 +2793,11 @@ void QQmlDelegateModelGroup::setGroups(QQmlV8Function *args)
Moves \a count at \a from in a group \a to a new position.
*/
-void QQmlDelegateModelGroup::move(QQmlV8Function *args)
+void QQmlDelegateModelGroup::move(QQmlV4Function *args)
{
Q_D(QQmlDelegateModelGroup);
- if (args->Length() < 2)
+ if (args->length() < 2)
return;
Compositor::Group fromGroup = d->group;
@@ -2816,7 +2816,7 @@ void QQmlDelegateModelGroup::move(QQmlV8Function *args)
return;
}
- if (args->Length() > 2) {
+ if (args->length() > 2) {
v8::Handle<v8::Value> v = (*args)[2];
if (v->IsInt32())
count = v->Int32Value();
diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h
index d1cdd52bd3..6f2acf0924 100644
--- a/src/qml/types/qqmldelegatemodel_p.h
+++ b/src/qml/types/qqmldelegatemodel_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
class QQmlChangeSet;
class QQmlComponent;
class QQuickPackage;
-class QQmlV8Function;
+class QQmlV4Function;
class QQmlDelegateModelGroup;
class QQmlDelegateModelAttached;
class QQmlDelegateModelPrivate;
@@ -168,14 +168,14 @@ public:
Q_INVOKABLE QQmlV4Handle get(int index);
public Q_SLOTS:
- void insert(QQmlV8Function *);
- void create(QQmlV8Function *);
- void resolve(QQmlV8Function *);
- void remove(QQmlV8Function *);
- void addGroups(QQmlV8Function *);
- void removeGroups(QQmlV8Function *);
- void setGroups(QQmlV8Function *);
- void move(QQmlV8Function *);
+ void insert(QQmlV4Function *);
+ void create(QQmlV4Function *);
+ void resolve(QQmlV4Function *);
+ void remove(QQmlV4Function *);
+ void addGroups(QQmlV4Function *);
+ void removeGroups(QQmlV4Function *);
+ void setGroups(QQmlV4Function *);
+ void move(QQmlV4Function *);
Q_SIGNALS:
void countChanged();
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index 16ecdd80be..9311ad0598 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -215,7 +215,7 @@ public:
bool parseIndex(const v8::Handle<v8::Value> &value, int *index, Compositor::Group *group) const;
bool parseGroupArgs(
- QQmlV8Function *args, Compositor::Group *group, int *index, int *count, int *groups) const;
+ QQmlV4Function *args, Compositor::Group *group, int *index, int *count, int *groups) const;
Compositor::Group group;
QQmlGuard<QQmlDelegateModel> model;
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 23a41d426b..d44773cb78 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -1894,13 +1894,13 @@ void QQmlListModel::clear()
\sa clear()
*/
-void QQmlListModel::remove(QQmlV8Function *args)
+void QQmlListModel::remove(QQmlV4Function *args)
{
- int argLength = args->Length();
+ int argLength = args->length();
if (argLength == 1 || argLength == 2) {
- int index = (*args)[0]->Int32Value();
- int removeCount = (argLength == 2 ? ((*args)[1]->Int32Value()) : 1);
+ int index = (*args)[0].toInt32();
+ int removeCount = (argLength == 2 ? (*args)[1].toInt32() : 1);
if (index < 0 || index+removeCount > count() || removeCount <= 0) {
qmlInfo(this) << tr("remove: indices [%1 - %2] out of range [0 - %3]").arg(index).arg(index+removeCount).arg(count());
@@ -1937,9 +1937,9 @@ void QQmlListModel::remove(QQmlV8Function *args)
\sa set(), append()
*/
-void QQmlListModel::insert(QQmlV8Function *args)
+void QQmlListModel::insert(QQmlV4Function *args)
{
- if (args->Length() == 2) {
+ if (args->length() == 2) {
v8::Handle<v8::Value> arg0 = (*args)[0];
int index = arg0->Int32Value();
@@ -2047,9 +2047,9 @@ void QQmlListModel::move(int from, int to, int n)
\sa set(), remove()
*/
-void QQmlListModel::append(QQmlV8Function *args)
+void QQmlListModel::append(QQmlV4Function *args)
{
- if (args->Length() == 1) {
+ if (args->length() == 1) {
v8::Handle<v8::Value> arg = (*args)[0];
if (arg->IsArray()) {
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 312abb6673..722cb2b44d 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -81,9 +81,9 @@ public:
int count() const;
Q_INVOKABLE void clear();
- Q_INVOKABLE void remove(QQmlV8Function *args);
- Q_INVOKABLE void append(QQmlV8Function *args);
- Q_INVOKABLE void insert(QQmlV8Function *args);
+ Q_INVOKABLE void remove(QQmlV4Function *args);
+ Q_INVOKABLE void append(QQmlV4Function *args);
+ Q_INVOKABLE void insert(QQmlV4Function *args);
Q_INVOKABLE QQmlV4Handle get(int index) const;
Q_INVOKABLE void set(int index, const QQmlV4Handle &);
Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qml/types/qqmllistmodelworkeragent.cpp
index 827fe03c61..1dc5fcf953 100644
--- a/src/qml/types/qqmllistmodelworkeragent.cpp
+++ b/src/qml/types/qqmllistmodelworkeragent.cpp
@@ -132,17 +132,17 @@ void QQmlListModelWorkerAgent::clear()
m_copy->clear();
}
-void QQmlListModelWorkerAgent::remove(QQmlV8Function *args)
+void QQmlListModelWorkerAgent::remove(QQmlV4Function *args)
{
m_copy->remove(args);
}
-void QQmlListModelWorkerAgent::append(QQmlV8Function *args)
+void QQmlListModelWorkerAgent::append(QQmlV4Function *args)
{
m_copy->append(args);
}
-void QQmlListModelWorkerAgent::insert(QQmlV8Function *args)
+void QQmlListModelWorkerAgent::insert(QQmlV4Function *args)
{
m_copy->insert(args);
}
diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qml/types/qqmllistmodelworkeragent_p.h
index a76f66005b..1299d81c56 100644
--- a/src/qml/types/qqmllistmodelworkeragent_p.h
+++ b/src/qml/types/qqmllistmodelworkeragent_p.h
@@ -81,9 +81,9 @@ public:
int count() const;
Q_INVOKABLE void clear();
- Q_INVOKABLE void remove(QQmlV8Function *args);
- Q_INVOKABLE void append(QQmlV8Function *args);
- Q_INVOKABLE void insert(QQmlV8Function *args);
+ Q_INVOKABLE void remove(QQmlV4Function *args);
+ Q_INVOKABLE void append(QQmlV4Function *args);
+ Q_INVOKABLE void insert(QQmlV4Function *args);
Q_INVOKABLE QQmlV4Handle get(int index) const;
Q_INVOKABLE void set(int index, const QQmlV4Handle &);
Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 6a98621783..b0822968e3 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -652,7 +652,7 @@ void QQuickWorkerScript::setSource(const QUrl &source)
of ListModel objects, any modifications by the other thread to an object
passed in \c message will not be reflected in the original object.
*/
-void QQuickWorkerScript::sendMessage(QQmlV8Function *args)
+void QQuickWorkerScript::sendMessage(QQmlV4Function *args)
{
if (!engine()) {
qWarning("QQuickWorkerScript: Attempt to send message before WorkerScript establishment");
@@ -660,7 +660,7 @@ void QQuickWorkerScript::sendMessage(QQmlV8Function *args)
}
v8::Handle<v8::Value> argument = QV4::Value::undefinedValue();
- if (args->Length() != 0)
+ if (args->length() != 0)
argument = (*args)[0];
m_engine->sendMessage(m_scriptId, QV8Worker::serialize(argument, args->engine()));
diff --git a/src/qml/types/qquickworkerscript_p.h b/src/qml/types/qquickworkerscript_p.h
index 7921b90295..bf23a3f2a2 100644
--- a/src/qml/types/qquickworkerscript_p.h
+++ b/src/qml/types/qquickworkerscript_p.h
@@ -84,7 +84,7 @@ private:
QQuickWorkerScriptEnginePrivate *d;
};
-class QQmlV8Function;
+class QQmlV4Function;
class QQmlV4Handle;
class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus
{
@@ -100,7 +100,7 @@ public:
void setSource(const QUrl &);
public slots:
- void sendMessage(QQmlV8Function*);
+ void sendMessage(QQmlV4Function*);
signals:
void sourceChanged();