diff options
author | Liang Qi <liang.qi@digia.com> | 2013-10-03 10:30:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-20 10:06:12 +0100 |
commit | 6d4d98bc593289d4418a1ab83f00dca0608da23e (patch) | |
tree | 86e4cefff6769fb6bc86bc06b614f9fba5f32944 /src/qml/jsruntime/qv4object.cpp | |
parent | d53313288e61e3e530f07fcc48ebd024bc11da35 (diff) |
V4: fix Array.indexOf() for QStringList
Autotest is included.
Task-number: QTBUG-33542
Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 4fadec7860..cca7d2b26a 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -1133,7 +1133,7 @@ ReturnedValue Object::arrayIndexOf(const ValueRef v, uint fromIndex, uint endInd Scope scope(engine()); ScopedValue value(scope); - if (o->protoHasArray() || o->arrayAttributes) { + if (!(flags & SimpleArray) || o->protoHasArray() || o->arrayAttributes) { // lets be safe and slow for (uint i = fromIndex; i < endIndex; ++i) { bool exists; |