diff options
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject_p.h | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4serialize.cpp | 18 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 4 |
7 files changed, 17 insertions, 16 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 2b89a37771..78614eeffb 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -1179,8 +1179,8 @@ QStringList ArrayObject::toQStringList() const Scope scope(engine); ScopedValue v(scope); - uint32_t length = getLength(); - for (uint32_t i = 0; i < length; ++i) { + uint length = getLength(); + for (uint i = 0; i < length; ++i) { v = const_cast<ArrayObject *>(this)->getIndexed(i); result.append(v->toQStringNoThrow()); } diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 6a120c4074..d96595af21 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1635,8 +1635,8 @@ void CallArgument::fromValue(int callType, QV8Engine *engine, const QV4::ValueRe if (array) { Scoped<QV4::QObjectWrapper> qobjectWrapper(scope); - uint32_t length = array->getLength(); - for (uint32_t ii = 0; ii < length; ++ii) { + uint length = array->getLength(); + for (uint ii = 0; ii < length; ++ii) { QObject *o = 0; qobjectWrapper = array->getIndexed(ii); if (!!qobjectWrapper) diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index c327437bdf..0c6965ec84 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -35,6 +35,7 @@ #include "qv4jsir_p.h" #include "qv4isel_p.h" #include "qv4objectproto_p.h" +#include "qv4regexp_p.h" #include "qv4stringobject_p.h" #include "qv4mm_p.h" #include "qv4scopedvalue_p.h" diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index cd1cf4f578..febd0dd7b2 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -43,7 +43,6 @@ #include "qv4managed_p.h" #include "qv4property_p.h" #include "qv4objectiterator_p.h" -#include "qv4regexp_p.h" #include <QtCore/QString> #include <QtCore/QHash> diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp index 33d65fbd8f..5eb3e81b51 100644 --- a/src/qml/jsruntime/qv4serialize.cpp +++ b/src/qml/jsruntime/qv4serialize.cpp @@ -159,7 +159,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en push(data, valueheader(WorkerUndefined)); return; } - int utf16size = ALIGN(length * sizeof(uint16_t)); + int utf16size = ALIGN(length * sizeof(quint16)); reserve(data, utf16size + sizeof(quint32)); push(data, valueheader(WorkerString, length)); @@ -175,7 +175,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en push(data, valueheader(WorkerUndefined)); } else if (v->asArrayObject()) { QV4::ScopedArrayObject array(scope, v); - uint32_t length = array->getLength(); + uint length = array->getLength(); if (length > 0xFFFFFF) { push(data, valueheader(WorkerUndefined)); return; @@ -183,7 +183,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en reserve(data, sizeof(quint32) + length * sizeof(quint32)); push(data, valueheader(WorkerArray, length)); ScopedValue val(scope); - for (uint32_t ii = 0; ii < length; ++ii) + for (uint ii = 0; ii < length; ++ii) serialize(data, (val = array->getIndexed(ii)), engine); } else if (v->isInteger()) { reserve(data, 2 * sizeof(quint32)); @@ -210,7 +210,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en push(data, valueheader(WorkerUndefined)); return; } - int utf16size = ALIGN(length * sizeof(uint16_t)); + int utf16size = ALIGN(length * sizeof(quint16)); reserve(data, sizeof(quint32) + utf16size); push(data, valueheader(WorkerRegexp, flags)); @@ -239,8 +239,8 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en ScopedObject o(scope, v); if (o->isListType()) { // valid sequence. we generate a length (sequence length + 1 for the sequence type) - uint32_t seqLength = ScopedValue(scope, o->get(v4->id_length))->toUInt32(); - uint32_t length = seqLength + 1; + uint seqLength = ScopedValue(scope, o->get(v4->id_length))->toUInt32(); + uint length = seqLength + 1; if (length > 0xFFFFFF) { push(data, valueheader(WorkerUndefined)); return; @@ -249,7 +249,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en push(data, valueheader(WorkerSequence, length)); serialize(data, QV4::Primitive::fromInt32(QV4::SequencePrototype::metaTypeForSequence(o)), engine); // sequence type ScopedValue val(scope); - for (uint32_t ii = 0; ii < seqLength; ++ii) + for (uint ii = 0; ii < seqLength; ++ii) serialize(data, (val = o->getIndexed(ii)), engine); // sequence elements return; @@ -305,7 +305,7 @@ ReturnedValue Serialize::deserialize(const char *&data, QV8Engine *engine) { quint32 size = headersize(header); QString qstr((QChar *)data, size); - data += ALIGN(size * sizeof(uint16_t)); + data += ALIGN(size * sizeof(quint16)); return QV4::Encode(v4->newString(qstr)); } case WorkerFunction: @@ -350,7 +350,7 @@ ReturnedValue Serialize::deserialize(const char *&data, QV8Engine *engine) quint32 flags = headersize(header); quint32 length = popUint32(data); QString pattern = QString((QChar *)data, length - 1); - data += ALIGN(length * sizeof(uint16_t)); + data += ALIGN(length * sizeof(quint16)); return Encode(v4->newRegExpObject(pattern, flags)); } case WorkerListModel: diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index e15ab50e80..ed29c84ff9 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -33,6 +33,7 @@ #include "qv4stringobject_p.h" +#include "qv4regexp_p.h" #include "qv4regexpobject_p.h" #include "qv4objectproto_p.h" #include "qv4mm_p.h" diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 41ef719c64..e08f2c494f 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -199,9 +199,9 @@ QVariant QV8Engine::toVariant(const QV4::ValueRef value, int typeHint, bool crea QV4::ScopedArrayObject a(scope, value); if (typeHint == qMetaTypeId<QList<QObject *> >()) { QList<QObject *> list; - uint32_t length = a->getLength(); + uint length = a->getLength(); QV4::Scoped<QV4::QObjectWrapper> qobjectWrapper(scope); - for (uint32_t ii = 0; ii < length; ++ii) { + for (uint ii = 0; ii < length; ++ii) { qobjectWrapper = a->getIndexed(ii); if (!!qobjectWrapper) { list << qobjectWrapper->object(); |