Fix warnings in sequence wrapper code
authorChris Adams <christopher.adams@nokia.com>
Wed, 8 Feb 2012 05:45:18 +0000 (15:45 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 15 Feb 2012 06:26:36 +0000 (07:26 +0100)
commit3c3b9956c6ba18c424027ec77dfcddbe7bac60b9
tree50ede7228f1b93abea0ef1467b5b74a1cffd5d21
parent03883c22264df65586db0a603569c9d196e06034
Fix warnings in sequence wrapper code

Previously, the sequence wrapper had unsigned int / signed int
comparisons (due to Qt container classes only allowing signed int
indexes (where negative indexes are invalid).

This commit ensures that unsigned indexes are bounds checked
appropriately, and also fixes a warning due to QString construction
from QByteArray.  Finally, it updates the documentation for sequences
to clarify the indexing semantics.

Change-Id: I4c6e133bef6e980a9ccb62ff15a70a5d41537ee3
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
doc/src/qml/qmltypes.qdoc
src/declarative/qml/v8/qv8sequencewrapper_p_p.h
tests/auto/declarative/qdeclarativeecmascript/data/sequenceConversion.indexes.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/testtypes.h
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp