aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sequenceobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index 8b0e31cb71..feb3806ba5 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -166,6 +166,7 @@ template <typename Container>
class QQmlSequence : public QV4::Object
{
Q_MANAGED
+ Q_MANAGED_TYPE(QmlSequence)
public:
QQmlSequence(QV4::ExecutionEngine *engine, const Container &container)
: QV4::Object(InternalClass::create(engine, &static_vtbl, engine->sequencePrototype.asObject()))
@@ -174,8 +175,7 @@ public:
, m_propertyIndex(-1)
, m_isReference(false)
{
- type = Type_QmlSequence;
- flags &= ~SimpleArray;
+ setArrayType(ArrayData::Custom);
QV4::Scope scope(engine);
QV4::ScopedObject protectThis(scope, this);
Q_UNUSED(protectThis);
@@ -188,8 +188,7 @@ public:
, m_propertyIndex(propertyIndex)
, m_isReference(true)
{
- type = Type_QmlSequence;
- flags &= ~SimpleArray;
+ setArrayType(ArrayData::Custom);
QV4::Scope scope(engine);
QV4::ScopedObject protectThis(scope, this);
Q_UNUSED(protectThis);
@@ -469,7 +468,7 @@ public:
{
QV4::Scope scope(array->engine());
Container result;
- quint32 length = array->arrayLength();
+ quint32 length = array->getLength();
QV4::ScopedValue v(scope);
for (quint32 i = 0; i < length; ++i)
result << convertValueToElement<typename Container::value_type>((v = array->getIndexed(i)));