diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-19 10:59:41 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-19 13:07:10 +0200 |
commit | 3e08aa42497f7d264be039f31f4eedf639eda307 (patch) | |
tree | 871ee4f38715ab0111fe8e2c49756ca60390898e /src/qml | |
parent | 190b376859ae9709e887886fcbaa56d60495be66 (diff) |
Rename QQmlV8Handle to QQmlV4Handle
The handle wraps a V4 Value, so this is the better name for it.
Also added some accessor methods to convert to and from V4
Values.
Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlglobal_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 6 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 15 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine_p.h | 21 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8qobjectwrapper.cpp | 22 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8valuetypewrapper.cpp | 2 | ||||
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 16 | ||||
-rw-r--r-- | src/qml/types/qqmldelegatemodel_p.h | 4 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 8 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel_p.h | 4 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodelworkeragent.cpp | 4 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodelworkeragent_p.h | 4 | ||||
-rw-r--r-- | src/qml/types/qquickworkerscript.cpp | 2 | ||||
-rw-r--r-- | src/qml/types/qquickworkerscript_p.h | 4 |
19 files changed, 76 insertions, 58 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 49f6dec7fa..7ee21a79e4 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -241,8 +241,8 @@ void QQmlBoundSignalExpression::evaluate(void **a) } else if (type == QMetaType::Int) { //### optimization. Can go away if we switch to metaTypeToJS, or be expanded otherwise args[ii] = v8::Integer::New(*reinterpret_cast<const int*>(a[ii + 1])); - } else if (type == qMetaTypeId<QQmlV8Handle>()) { - args[ii] = reinterpret_cast<QQmlV8Handle *>(a[ii + 1])->toHandle(); + } else if (type == qMetaTypeId<QQmlV4Handle>()) { + args[ii] = reinterpret_cast<QQmlV4Handle *>(a[ii + 1])->toV8Handle(); } else if (ep->isQObject(type)) { if (!*reinterpret_cast<void* const *>(a[ii + 1])) args[ii] = v8::Null(); diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 25ef080cb5..9a7b218ca7 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -740,7 +740,7 @@ void QQmlEnginePrivate::init() qRegisterMetaType<QQmlComponent::Status>(); qRegisterMetaType<QList<QObject*> >(); qRegisterMetaType<QList<int> >(); - qRegisterMetaType<QQmlV8Handle>(); + qRegisterMetaType<QQmlV4Handle>(); v8engine()->setEngine(q); diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 607ee4d0ac..8418217ab9 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -181,7 +181,7 @@ QVariant QQmlValueTypeProvider::createVariantFromString(int type, const QString return QVariant(); } -QVariant QQmlValueTypeProvider::createVariantFromJsObject(int type, QQmlV8Handle obj, QV8Engine *e, bool *ok) +QVariant QQmlValueTypeProvider::createVariantFromJsObject(int type, QQmlV4Handle obj, QV8Engine *e, bool *ok) { QVariant v; @@ -262,7 +262,7 @@ bool QQmlValueTypeProvider::createFromString(int, const QString &, void *, size_ bool QQmlValueTypeProvider::createStringFrom(int, const void *, QString *) { return false; } bool QQmlValueTypeProvider::variantFromString(const QString &, QVariant *) { return false; } bool QQmlValueTypeProvider::variantFromString(int, const QString &, QVariant *) { return false; } -bool QQmlValueTypeProvider::variantFromJsObject(int, QQmlV8Handle, QV8Engine *, QVariant *) { return false; } +bool QQmlValueTypeProvider::variantFromJsObject(int, QQmlV4Handle, QV8Engine *, QVariant *) { return false; } bool QQmlValueTypeProvider::equal(int, const void *, const void *, size_t) { return false; } bool QQmlValueTypeProvider::store(int, const void *, void *, size_t) { return false; } bool QQmlValueTypeProvider::read(int, const void *, size_t, int, void *) { return false; } diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index 6ca54f65cd..c9eec4c23b 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -243,7 +243,7 @@ public: QVariant createVariantFromString(const QString &); QVariant createVariantFromString(int, const QString &, bool *); - QVariant createVariantFromJsObject(int, QQmlV8Handle, QV8Engine *, bool*); + QVariant createVariantFromJsObject(int, QQmlV4Handle, QV8Engine *, bool*); bool equalValueType(int, const void *, const void *, size_t); bool storeValueType(int, const void *, void *, size_t); @@ -263,7 +263,7 @@ private: virtual bool variantFromString(const QString &, QVariant *); virtual bool variantFromString(int, const QString &, QVariant *); - virtual bool variantFromJsObject(int, QQmlV8Handle, QV8Engine *, QVariant *); + virtual bool variantFromJsObject(int, QQmlV4Handle, QV8Engine *, QVariant *); virtual bool equal(int, const void *, const void *, size_t); virtual bool store(int, const void *, void *, size_t); diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index b1ffc9a2d5..0ed649bdd1 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -117,8 +117,8 @@ static QQmlPropertyData::Flags flagsForPropertyType(int propType, QQmlEngine *en flags |= QQmlPropertyData::IsQmlBinding; } else if (propType == qMetaTypeId<QJSValue>()) { flags |= QQmlPropertyData::IsQJSValue; - } else if (propType == qMetaTypeId<QQmlV8Handle>()) { - flags |= QQmlPropertyData::IsV8Handle; + } else if (propType == qMetaTypeId<QQmlV4Handle>()) { + flags |= QQmlPropertyData::IsV4Handle; } else { QQmlMetaType::TypeCategory cat = engine ? QQmlEnginePrivate::get(engine)->typeCategory(propType) diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 63b8b79fd2..960f3e55d8 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -101,7 +101,7 @@ public: IsQList = 0x00000800, // Property type is a QML list IsQmlBinding = 0x00001000, // Property type is a QQmlBinding* IsQJSValue = 0x00002000, // Property type is a QScriptValue - IsV8Handle = 0x00004000, // Property type is a QQmlV8Handle + IsV4Handle = 0x00004000, // Property type is a QQmlV4Handle IsVarProperty = 0x00008000, // Property type is a "var" property of VMEMO IsValueTypeVirtual = 0x00010000, // Property is a value type "virtual" property IsQVariant = 0x00020000, // Property is a QVariant @@ -121,7 +121,7 @@ public: // Flags that are set based on the propType field PropTypeFlagMask = IsQObjectDerived | IsEnumType | IsQList | IsQmlBinding | IsQJSValue | - IsV8Handle | IsQVariant, + IsV4Handle | IsQVariant, }; Q_DECLARE_FLAGS(Flags, Flag) @@ -144,7 +144,7 @@ public: bool isQList() const { return flags & IsQList; } bool isQmlBinding() const { return flags & IsQmlBinding; } bool isQJSValue() const { return flags & IsQJSValue; } - bool isV8Handle() const { return flags & IsV8Handle; } + bool isV4Handle() const { return flags & IsV4Handle; } bool isVarProperty() const { return flags & IsVarProperty; } bool isValueTypeVirtual() const { return flags & IsValueTypeVirtual; } bool isQVariant() const { return flags & IsQVariant; } diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index d04cc4cee9..f68ffcc1d1 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -632,7 +632,7 @@ v8::Handle<v8::Value> font(const v8::Arguments &args) v8::Handle<v8::Object> obj = args[0]->ToObject(); bool ok = false; - QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QFont, QQmlV8Handle::fromHandle(obj), V8ENGINE(), &ok); + QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QFont, QQmlV4Handle::fromV8Handle(obj), V8ENGINE(), &ok); if (!ok) V8THROW_ERROR("Qt.font(): Invalid argument: no valid font subproperties specified"); return V8ENGINE()->fromVariant(v); @@ -650,7 +650,7 @@ v8::Handle<v8::Value> matrix4x4(const v8::Arguments &args) if (args.Length() == 1 && args[0]->IsObject()) { v8::Handle<v8::Object> obj = args[0]->ToObject(); bool ok = false; - QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QMatrix4x4, QQmlV8Handle::fromHandle(obj), V8ENGINE(), &ok); + QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QMatrix4x4, QQmlV4Handle::fromV8Handle(obj), V8ENGINE(), &ok); if (!ok) V8THROW_ERROR("Qt.matrix4x4(): Invalid argument: not a valid matrix4x4 values array"); return V8ENGINE()->fromVariant(v); diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 9eaa7eaec9..c1b4c051cd 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -1573,5 +1573,20 @@ v8::Local<v8::String> QV8Engine::toString(const QString &string) return QJSConverter::toString(string); } + +QQmlJS::VM::Value QQmlV4Handle::toValue() const +{ + QQmlJS::VM::Value val; + val.val = d; + return val; +} + +QQmlV4Handle QQmlV4Handle::fromValue(const QQmlJS::VM::Value &v) +{ + QQmlV4Handle handle; + handle.d = v.val; + return handle; +} + QT_END_NAMESPACE diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index fde5b63f9c..dbe90a7a10 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -203,21 +203,24 @@ private: QV8Engine *_e; }; -class QQmlV8Handle +class QQmlV4Handle { public: - QQmlV8Handle() : d(0) {} - QQmlV8Handle(const QQmlV8Handle &other) : d(other.d) {} - QQmlV8Handle &operator=(const QQmlV8Handle &other) { d = other.d; return *this; } + QQmlV4Handle() : d(0) {} + QQmlV4Handle(const QQmlV4Handle &other) : d(other.d) {} + QQmlV4Handle &operator=(const QQmlV4Handle &other) { d = other.d; return *this; } - static QQmlV8Handle fromHandle(v8::Handle<v8::Value> h) { - return QQmlV8Handle(h); + static QQmlV4Handle fromV8Handle(v8::Handle<v8::Value> h) { + return QQmlV4Handle(h); } - v8::Handle<v8::Value> toHandle() const { + v8::Handle<v8::Value> toV8Handle() const { return v8::Value::NewFromInternalValue(d); } + + QQmlJS::VM::Value toValue() const; + static QQmlV4Handle fromValue(const QQmlJS::VM::Value &v); private: - QQmlV8Handle(v8::Handle<v8::Value> h) : d(h.val) {} + QQmlV4Handle(v8::Handle<v8::Value> h) : d(h.val) {} quint64 d; }; @@ -637,6 +640,6 @@ QV8Engine::Deletable *QV8Engine::extensionData(int index) const QT_END_NAMESPACE -Q_DECLARE_METATYPE(QQmlV8Handle) +Q_DECLARE_METATYPE(QQmlV4Handle) #endif // QQMLV8ENGINE_P_H diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index b59d4806a8..15265517cc 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -149,7 +149,7 @@ private: QString, QList<QObject *>, QJSValue, - QQmlV8Handle, + QQmlV4Handle, QJsonArray, QJsonObject, QJsonValue>::Size]; @@ -162,7 +162,7 @@ private: QVariant *qvariantPtr; QList<QObject *> *qlistPtr; QJSValue *qjsValuePtr; - QQmlV8Handle *handlePtr; + QQmlV4Handle *handlePtr; QJsonArray *jsonArrayPtr; QJsonObject *jsonObjectPtr; QJsonValue *jsonValuePtr; @@ -426,10 +426,10 @@ static v8::Handle<v8::Value> LoadProperty(QV8Engine *engine, QObject *object, double v = 0; ReadFunction(object, property, &v, notifier); return valueToHandle(engine, v); - } else if (property.isV8Handle()) { - QQmlV8Handle handle; + } else if (property.isV4Handle()) { + QQmlV4Handle handle; ReadFunction(object, property, &handle, notifier); - return handle.toHandle(); + return handle.toV8Handle(); } else if (property.propType == qMetaTypeId<QJSValue>()) { QJSValue v; ReadFunction(object, property, &v, notifier); @@ -2117,9 +2117,9 @@ void CallArgument::initAsType(int callType) } else if (callType == qMetaTypeId<QList<QObject *> >()) { type = callType; qlistPtr = new (&allocData) QList<QObject *>(); - } else if (callType == qMetaTypeId<QQmlV8Handle>()) { + } else if (callType == qMetaTypeId<QQmlV4Handle>()) { type = callType; - handlePtr = new (&allocData) QQmlV8Handle; + handlePtr = new (&allocData) QQmlV4Handle; } else if (callType == QMetaType::QJsonArray) { type = callType; jsonArrayPtr = new (&allocData) QJsonArray(); @@ -2183,8 +2183,8 @@ void CallArgument::fromValue(int callType, QV8Engine *engine, v8::Handle<v8::Val qlistPtr->append(engine->toQObject(value)); } type = callType; - } else if (callType == qMetaTypeId<QQmlV8Handle>()) { - handlePtr = new (&allocData) QQmlV8Handle(QQmlV8Handle::fromHandle(value)); + } else if (callType == qMetaTypeId<QQmlV4Handle>()) { + handlePtr = new (&allocData) QQmlV4Handle(QQmlV4Handle::fromV8Handle(value)); type = callType; } else if (callType == QMetaType::QJsonArray) { jsonArrayPtr = new (&allocData) QJsonArray(engine->jsonArrayFromJS(value)); @@ -2258,8 +2258,8 @@ v8::Handle<v8::Value> CallArgument::toValue(QV8Engine *engine) for (int ii = 0; ii < list.count(); ++ii) array->Set(ii, engine->newQObject(list.at(ii))); return array; - } else if (type == qMetaTypeId<QQmlV8Handle>()) { - return handlePtr->toHandle(); + } else if (type == qMetaTypeId<QQmlV4Handle>()) { + return handlePtr->toV8Handle(); } else if (type == QMetaType::QJsonArray) { return engine->jsonArrayToJS(*jsonArrayPtr); } else if (type == QMetaType::QJsonObject) { diff --git a/src/qml/qml/v8/qv8valuetypewrapper.cpp b/src/qml/qml/v8/qv8valuetypewrapper.cpp index 99ee938e0c..42e40fd33e 100644 --- a/src/qml/qml/v8/qv8valuetypewrapper.cpp +++ b/src/qml/qml/v8/qv8valuetypewrapper.cpp @@ -192,7 +192,7 @@ QVariant QV8ValueTypeWrapper::toVariant(v8::Handle<v8::Object> obj, int typeHint // NOTE: obj must not be an external resource object (ie, wrapper object) // instead, it is a normal js object which one of the value-type providers // may know how to convert to the given type. - return QQml_valueTypeProvider()->createVariantFromJsObject(typeHint, QQmlV8Handle::fromHandle(obj), m_engine, succeeded); + return QQml_valueTypeProvider()->createVariantFromJsObject(typeHint, QQmlV4Handle::fromV8Handle(obj), m_engine, succeeded); } QVariant QV8ValueTypeWrapper::toVariant(v8::Handle<v8::Object> obj) diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index efbd98bdbc..56aed723e2 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -2095,7 +2095,7 @@ void QQmlDelegateModelGroupPrivate::setModel(QQmlDelegateModel *m, Compositor::G bool QQmlDelegateModelGroupPrivate::isChangedConnected() { Q_Q(QQmlDelegateModelGroup); - IS_SIGNAL_CONNECTED(q, QQmlDelegateModelGroup, changed, (const QQmlV8Handle &,const QQmlV8Handle &)); + IS_SIGNAL_CONNECTED(q, QQmlDelegateModelGroup, changed, (const QQmlV4Handle &,const QQmlV4Handle &)); } void QQmlDelegateModelGroupPrivate::emitChanges(QV8Engine *engine) @@ -2106,7 +2106,7 @@ void QQmlDelegateModelGroupPrivate::emitChanges(QV8Engine *engine) v8::Context::Scope contextScope(engine->context()); v8::Local<v8::Object> removed = engineData(engine)->array(engine, changeSet.removes()); v8::Local<v8::Object> inserted = engineData(engine)->array(engine, changeSet.inserts()); - emit q->changed(QQmlV8Handle::fromHandle(removed), QQmlV8Handle::fromHandle(inserted)); + emit q->changed(QQmlV4Handle::fromV8Handle(removed), QQmlV4Handle::fromV8Handle(inserted)); } if (changeSet.difference() != 0) emit q->countChanged(); @@ -2296,18 +2296,18 @@ void QQmlDelegateModelGroup::setDefaultInclude(bool include) \endlist */ -QQmlV8Handle QQmlDelegateModelGroup::get(int index) +QQmlV4Handle QQmlDelegateModelGroup::get(int index) { Q_D(QQmlDelegateModelGroup); if (!d->model) - return QQmlV8Handle::fromHandle(v8::Undefined());; + return QQmlV4Handle::fromV8Handle(v8::Undefined());; QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(d->model); if (!model->m_context->isValid()) { - return QQmlV8Handle::fromHandle(v8::Undefined()); + return QQmlV4Handle::fromV8Handle(v8::Undefined()); } else if (index < 0 || index >= model->m_compositor.count(d->group)) { qmlInfo(this) << tr("get: index out of range"); - return QQmlV8Handle::fromHandle(v8::Undefined()); + return QQmlV4Handle::fromV8Handle(v8::Undefined()); } Compositor::iterator it = model->m_compositor.find(d->group, index); @@ -2319,7 +2319,7 @@ QQmlV8Handle QQmlDelegateModelGroup::get(int index) cacheItem = model->m_adaptorModel.createItem( model->m_cacheMetaType, model->m_context->engine(), it.modelIndex()); if (!cacheItem) - return QQmlV8Handle::fromHandle(v8::Undefined()); + return QQmlV4Handle::fromV8Handle(v8::Undefined()); cacheItem->groups = it->flags; model->m_cache.insert(it.cacheIndex, cacheItem); @@ -2332,7 +2332,7 @@ QQmlV8Handle QQmlDelegateModelGroup::get(int index) handle->SetExternalResource(cacheItem); ++cacheItem->scriptRef; - return QQmlV8Handle::fromHandle(handle); + return QQmlV4Handle::fromV8Handle(handle); } bool QQmlDelegateModelGroupPrivate::parseIndex( diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h index 5702c59787..d1cdd52bd3 100644 --- a/src/qml/types/qqmldelegatemodel_p.h +++ b/src/qml/types/qqmldelegatemodel_p.h @@ -165,7 +165,7 @@ public: bool defaultInclude() const; void setDefaultInclude(bool include); - Q_INVOKABLE QQmlV8Handle get(int index); + Q_INVOKABLE QQmlV4Handle get(int index); public Q_SLOTS: void insert(QQmlV8Function *); @@ -181,7 +181,7 @@ Q_SIGNALS: void countChanged(); void nameChanged(); void defaultIncludeChanged(); - void changed(const QQmlV8Handle &removed, const QQmlV8Handle &inserted); + void changed(const QQmlV4Handle &removed, const QQmlV4Handle &inserted); private: Q_DECLARE_PRIVATE(QQmlDelegateModelGroup) }; diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 725e5b2544..e84366ba8d 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -2119,7 +2119,7 @@ void QQmlListModel::append(QQmlV8Function *args) \sa append() */ -QQmlV8Handle QQmlListModel::get(int index) const +QQmlV4Handle QQmlListModel::get(int index) const { v8::Handle<v8::Value> result = v8::Undefined(); @@ -2135,7 +2135,7 @@ QQmlV8Handle QQmlListModel::get(int index) const } } - return QQmlV8Handle::fromHandle(result); + return QQmlV4Handle::fromV8Handle(result); } /*! @@ -2154,9 +2154,9 @@ QQmlV8Handle QQmlListModel::get(int index) const \sa append() */ -void QQmlListModel::set(int index, const QQmlV8Handle &handle) +void QQmlListModel::set(int index, const QQmlV4Handle &handle) { - v8::Handle<v8::Value> valuemap = handle.toHandle(); + v8::Handle<v8::Value> valuemap = handle.toV8Handle(); if (!valuemap->IsObject() || valuemap->IsArray()) { qmlInfo(this) << tr("set: value is not an object"); diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h index 70477115bd..312abb6673 100644 --- a/src/qml/types/qqmllistmodel_p.h +++ b/src/qml/types/qqmllistmodel_p.h @@ -84,8 +84,8 @@ public: Q_INVOKABLE void remove(QQmlV8Function *args); Q_INVOKABLE void append(QQmlV8Function *args); Q_INVOKABLE void insert(QQmlV8Function *args); - Q_INVOKABLE QQmlV8Handle get(int index) const; - Q_INVOKABLE void set(int index, const QQmlV8Handle &); + 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); Q_INVOKABLE void move(int from, int to, int count); Q_INVOKABLE void sync(); diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qml/types/qqmllistmodelworkeragent.cpp index 9554e6d1e5..827fe03c61 100644 --- a/src/qml/types/qqmllistmodelworkeragent.cpp +++ b/src/qml/types/qqmllistmodelworkeragent.cpp @@ -147,12 +147,12 @@ void QQmlListModelWorkerAgent::insert(QQmlV8Function *args) m_copy->insert(args); } -QQmlV8Handle QQmlListModelWorkerAgent::get(int index) const +QQmlV4Handle QQmlListModelWorkerAgent::get(int index) const { return m_copy->get(index); } -void QQmlListModelWorkerAgent::set(int index, const QQmlV8Handle &value) +void QQmlListModelWorkerAgent::set(int index, const QQmlV4Handle &value) { m_copy->set(index, value); } diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qml/types/qqmllistmodelworkeragent_p.h index 614017069c..a76f66005b 100644 --- a/src/qml/types/qqmllistmodelworkeragent_p.h +++ b/src/qml/types/qqmllistmodelworkeragent_p.h @@ -84,8 +84,8 @@ public: Q_INVOKABLE void remove(QQmlV8Function *args); Q_INVOKABLE void append(QQmlV8Function *args); Q_INVOKABLE void insert(QQmlV8Function *args); - Q_INVOKABLE QQmlV8Handle get(int index) const; - Q_INVOKABLE void set(int index, const QQmlV8Handle &); + 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); Q_INVOKABLE void move(int from, int to, int count); Q_INVOKABLE void sync(); diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index ad09e1ec0c..474fdb0362 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -722,7 +722,7 @@ bool QQuickWorkerScript::event(QEvent *event) v8::HandleScope handle_scope; v8::Context::Scope scope(v8engine->context()); v8::Handle<v8::Value> value = QV8Worker::deserialize(workerEvent->data(), v8engine); - emit message(QQmlV8Handle::fromHandle(value)); + emit message(QQmlV4Handle::fromV8Handle(value)); } return true; } else if (event->type() == (QEvent::Type)WorkerErrorEvent::WorkerError) { diff --git a/src/qml/types/qquickworkerscript_p.h b/src/qml/types/qquickworkerscript_p.h index 1ab5208e45..7921b90295 100644 --- a/src/qml/types/qquickworkerscript_p.h +++ b/src/qml/types/qquickworkerscript_p.h @@ -85,7 +85,7 @@ private: }; class QQmlV8Function; -class QQmlV8Handle; +class QQmlV4Handle; class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus { Q_OBJECT @@ -104,7 +104,7 @@ public slots: signals: void sourceChanged(); - void message(const QQmlV8Handle &messageObject); + void message(const QQmlV4Handle &messageObject); protected: virtual void classBegin(); |