diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2021-10-01 16:57:56 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2021-10-04 16:53:33 +0300 |
commit | 7185a63b3c0bcc797d683c5070a799b69ade019b (patch) | |
tree | fae9ef4de05effe7971c0905074245d17ed78327 /src/qml/jsruntime | |
parent | 8fc3c036debf8e230200e1c7d2a8e65df140ca76 (diff) |
Fix warnings when which are treated as errors with -developer-build
Pick-to: 6.2
Task-number: QTBUG-91163
Change-Id: I7fdac1ff11b4e1c5a6b0caa6cbeae67ddc3effc4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 147163e653..55bfd750e9 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -220,7 +220,7 @@ public: } loadReference(); } - if (index < size()) { + if (index < quint32(size())) { if (hasProperty) *hasProperty = true; return engine()->fromVariant(at(index)); @@ -253,7 +253,7 @@ public: loadReference(); } - qsizetype count = size(); + quint32 count = quint32(size()); const QMetaType valueMetaType = meta(d())->valueMetaType(); const QVariant element = engine()->toVariant(value, valueMetaType, false); @@ -286,7 +286,7 @@ public: return QV4::Attr_Invalid; loadReference(); } - return (index < size()) ? QV4::Attr_Data : QV4::Attr_Invalid; + return (index < quint32(size())) ? QV4::Attr_Data : QV4::Attr_Invalid; } struct OwnPropertyKeyIterator : ObjectOwnPropertyKeyIterator @@ -302,7 +302,7 @@ public: s->loadReference(); } - if (arrayIndex < s->size()) { + if (arrayIndex < quint32(s->size())) { uint index = arrayIndex; ++arrayIndex; if (attrs) @@ -335,7 +335,7 @@ public: loadReference(); } - if (index >= size()) + if (index >= quint32(size())) return false; /* according to ECMA262r3 it should be Undefined, */ |