Fix equalitySemantics sub-test in qqmlecmascript::sequenceConversionArray
Implement Managed::isEqualTo correctly Change-Id: Ife4e2bf368037910614401e2ffa0c334b6581e30 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
84b62089b5
commit
f39c93a9ff
|
@ -296,6 +296,19 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool containerIsEqualTo(Managed *other)
|
||||
{
|
||||
QQmlSequence<Container> *otherSequence = other->as<QQmlSequence<Container> >();
|
||||
if (!otherSequence)
|
||||
return false;
|
||||
if (m_isReference && otherSequence->m_isReference) {
|
||||
return m_object == otherSequence->m_object && m_propertyIndex == otherSequence->m_propertyIndex;
|
||||
} else if (!m_isReference && !otherSequence->m_isReference) {
|
||||
return this == otherSequence;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void sort(QV4::SimpleCallContext *ctx)
|
||||
{
|
||||
if (m_isReference) {
|
||||
|
@ -443,6 +456,8 @@ private:
|
|||
{ return static_cast<QQmlSequence<Container> *>(that)->containerQueryIndexed(ctx, index); }
|
||||
static bool deleteIndexedProperty(QV4::Managed *that, QV4::ExecutionContext *ctx, uint index)
|
||||
{ return static_cast<QQmlSequence<Container> *>(that)->containerDeleteIndexedProperty(ctx, index); }
|
||||
static bool isEqualTo(Managed *that, Managed *other)
|
||||
{ return static_cast<QQmlSequence<Container> *>(that)->containerIsEqualTo(other); }
|
||||
|
||||
static void destroy(Managed *that)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue