aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2021-10-01 16:57:56 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2021-10-04 16:53:33 +0300
commit7185a63b3c0bcc797d683c5070a799b69ade019b (patch)
treefae9ef4de05effe7971c0905074245d17ed78327
parent8fc3c036debf8e230200e1c7d2a8e65df140ca76 (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>
-rw-r--r--src/qml/jsapi/qjsmanagedvalue.cpp2
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp10
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp2
-rw-r--r--src/qmlcompiler/qqmljscompiler.cpp4
-rw-r--r--src/qmldom/qqmldomcomments.cpp2
-rw-r--r--src/quick/items/qquickpincharea.cpp4
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode.cpp6
7 files changed, 16 insertions, 14 deletions
diff --git a/src/qml/jsapi/qjsmanagedvalue.cpp b/src/qml/jsapi/qjsmanagedvalue.cpp
index f248e12398..ce43b958cf 100644
--- a/src/qml/jsapi/qjsmanagedvalue.cpp
+++ b/src/qml/jsapi/qjsmanagedvalue.cpp
@@ -909,7 +909,7 @@ QJSValue QJSManagedValue::property(quint32 arrayIndex) const
if (QV4::String *string = d->as<QV4::String>()) {
const QString qString = string->toQString();
- if (arrayIndex < qString.size())
+ if (arrayIndex < quint32(qString.size()))
return qString.sliced(arrayIndex, 1);
return QJSValue();
}
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, */
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index f591f209b5..5a11e40203 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -1008,7 +1008,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void *
auto arguments = methodData->hasArguments() ? methodData->arguments() : nullptr;
if (arguments && arguments->names) {
- const auto parameterCount = arguments->names->count();
+ const quint32 parameterCount = arguments->names->count();
Q_ASSERT(parameterCount == function->formalParameterCount());
if (void *result = a[0])
arguments->types[0].destruct(result);
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp
index 9068fcd6b0..e9ccce9662 100644
--- a/src/qmlcompiler/qqmljscompiler.cpp
+++ b/src/qmlcompiler/qqmljscompiler.cpp
@@ -301,7 +301,7 @@ bool qCompileQmlFile(QmlIR::Document &irDocument, const QString &inputFileName,
break;
}
- Q_ASSERT(functionsToCompile.length() > binding->value.compiledScriptIndex);
+ Q_ASSERT(quint32(functionsToCompile.length()) > binding->value.compiledScriptIndex);
auto *node = functionsToCompile[binding->value.compiledScriptIndex].parentNode;
Q_ASSERT(node);
Q_ASSERT(module->contextMap.contains(node));
@@ -312,7 +312,7 @@ bool qCompileQmlFile(QmlIR::Document &irDocument, const QString &inputFileName,
<< irDocument.stringAt(binding->propertyNameIndex);
result = aotCompiler->compileBinding(context, *binding);
} else if (const auto *function = bindingOrFunction.function()) {
- Q_ASSERT(functionsToCompile.length() > function->index);
+ Q_ASSERT(quint32(functionsToCompile.length()) > function->index);
auto *node = functionsToCompile[function->index].node;
Q_ASSERT(node);
Q_ASSERT(module->contextMap.contains(node));
diff --git a/src/qmldom/qqmldomcomments.cpp b/src/qmldom/qqmldomcomments.cpp
index af58b6d821..7edcc0c9d9 100644
--- a/src/qmldom/qqmldomcomments.cpp
+++ b/src/qmldom/qqmldomcomments.cpp
@@ -555,7 +555,7 @@ void AstComments::collectComments(std::shared_ptr<Engine> engine, AST::Node *n,
}
if (iPre == 0)
preNewline = 1;
- quint32 iPost = cLoc.end();
+ qsizetype iPost = cLoc.end();
while (iPost < code.size()) {
QChar c = code.at(iPost);
if (!c.isSpace()) {
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index ed8506b440..6e5cd7a94c 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -360,7 +360,7 @@ void QQuickPinchArea::touchEvent(QTouchEvent *event)
void QQuickPinchArea::clearPinch(QTouchEvent *event)
{
Q_D(QQuickPinchArea);
- qCDebug(lcPA, "clear: %lld touchpoints", d->touchPoints.count());
+ qCDebug(lcPA, "clear: %" PRIdQSIZETYPE " touchpoints", d->touchPoints.count());
d->touchPoints.clear();
if (d->inPinch) {
d->inPinch = false;
@@ -395,7 +395,7 @@ void QQuickPinchArea::clearPinch(QTouchEvent *event)
void QQuickPinchArea::cancelPinch(QTouchEvent *event)
{
Q_D(QQuickPinchArea);
- qCDebug(lcPA, "cancel: %lld touchpoints", d->touchPoints.count());
+ qCDebug(lcPA, "cancel: %" PRIdQSIZETYPE " touchpoints", d->touchPoints.count());
d->touchPoints.clear();
if (d->inPinch) {
d->inPinch = false;
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
index dd938eab8b..99e5acbe33 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
@@ -139,7 +139,9 @@ void QSGDistanceFieldGlyphNode::setGlyphs(const QPointF &position, const QGlyphR
const QVector<quint32> glyphIndexes = m_glyphs.glyphIndexes();
for (int i = 0; i < glyphIndexes.count(); ++i)
m_allGlyphIndexesLookup.insert(glyphIndexes.at(i));
- qCDebug(lcSgText, "inserting %lld glyphs, %lld unique", glyphIndexes.count(), m_allGlyphIndexesLookup.count());
+ qCDebug(lcSgText, "inserting %" PRIdQSIZETYPE " glyphs, %" PRIdQSIZETYPE " unique",
+ glyphIndexes.count(),
+ m_allGlyphIndexesLookup.count());
#ifdef QSG_RUNTIME_DESCRIPTION
qsgnode_set_description(this, QString::number(glyphs.glyphIndexes().count()) + QStringLiteral(" DF glyphs: ") +
m_glyphs.rawFont().familyName() + QStringLiteral(" ") + QString::number(m_glyphs.rawFont().pixelSize()));
@@ -324,7 +326,7 @@ void QSGDistanceFieldGlyphNode::updateGeometry()
Q_ASSERT(m_glyphsInOtherTextures.isEmpty());
} else {
if (!m_glyphsInOtherTextures.isEmpty())
- qCDebug(lcSgText, "%lld 'other' textures", m_glyphsInOtherTextures.count());
+ qCDebug(lcSgText, "%" PRIdQSIZETYPE " 'other' textures", m_glyphsInOtherTextures.count());
QHash<const QSGDistanceFieldGlyphCache::Texture *, GlyphInfo>::const_iterator ite = m_glyphsInOtherTextures.constBegin();
while (ite != m_glyphsInOtherTextures.constEnd()) {
QGlyphRun subNodeGlyphRun(m_glyphs);