From 3320cd7b0d2ba83f3eb7fd9776470b4ca5248938 Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Mon, 8 Jun 2020 09:00:19 +0200 Subject: Fix compile warnings related to deprecations or unused variables Change-Id: I3d8fa0940a22f40bec3809b302cc59a40a5c3c52 Reviewed-by: Mike Krus --- src/core/nodes/qentity.cpp | 4 ++-- src/plugins/sceneparsers/gltf/gltfimporter.cpp | 8 -------- src/render/framegraph/qframegraphnode.cpp | 4 ++-- src/render/frontend/qrenderaspect.cpp | 2 +- src/render/texture/qtexture.cpp | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index 551dc685b..02f84b924 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -84,7 +84,7 @@ QStringList dumpSG(const Qt3DCore::QNode *n, int level = 0) const auto *entity = qobject_cast(n); if (entity != nullptr) { QString res = dumpNode(entity); - reply += res.rightJustified(res.length() + level * 2, ' '); + reply += res.rightJustified(res.length() + level * 2, QLatin1Char(' ')); level++; } @@ -301,7 +301,7 @@ QNodeId QEntityPrivate::parentEntityId() const QString QEntityPrivate::dumpSceneGraph() const { Q_Q(const QEntity); - return dumpSG(q).join('\n'); + return dumpSG(q).join(QLatin1Char('\n')); } void QEntityPrivate::updateComponentRelationShip(QComponent *component, ComponentRelationshipChange::RelationShip change) diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index 05c235977..856ac70e6 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -1499,14 +1499,6 @@ void GLTFImporter::processJSONBufferView(const QString &id, const QJsonObject& j } const auto &bufferData = *it; - const QJsonValue targetValue = json.value(KEY_TARGET); - int target; - if (targetValue.isUndefined()) { - target = GL_ARRAY_BUFFER; - } else { - target = targetValue.toInt(); - } - quint64 offset = 0; const auto byteOffset = json.value(KEY_BYTE_OFFSET); if (!byteOffset.isUndefined()) { diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp index d28030cb0..1c2829399 100644 --- a/src/render/framegraph/qframegraphnode.cpp +++ b/src/render/framegraph/qframegraphnode.cpp @@ -83,7 +83,7 @@ QStringList dumpFG(const Qt3DCore::QNode *n, int level = 0) const Qt3DRender::QFrameGraphNode *fgNode = qobject_cast(n); if (fgNode) { QString res = dumpNode(fgNode); - reply += res.rightJustified(res.length() + level * 2, ' '); + reply += res.rightJustified(res.length() + level * 2, QLatin1Char(' ')); } const auto children = n->childNodes(); @@ -395,7 +395,7 @@ QVector QFrameGraphNodePrivate::childFrameGraphNodes() const QString QFrameGraphNodePrivate::dumpFrameGraph() const { Q_Q(const QFrameGraphNode); - return dumpFG(q).join('\n'); + return dumpFG(q).join(QLatin1Char('\n')); } QStringList QFrameGraphNodePrivate::dumpFrameGraphPaths() const diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp index 015f5bba2..6d2f8757a 100644 --- a/src/render/frontend/qrenderaspect.cpp +++ b/src/render/frontend/qrenderaspect.cpp @@ -254,7 +254,7 @@ QStringList dumpSGFilterState(Qt3DRender::Render::TechniqueManager *manager, res += QLatin1String(" [ %1 ]").arg(filters.join(QLatin1String(" "))); } } - reply += res.rightJustified(res.length() + level * 2, ' '); + reply += res.rightJustified(res.length() + level * 2, QLatin1Char(' ')); level++; } diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index f30e23d41..10e6c327e 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -1076,7 +1076,7 @@ QTextureDataPtr QTextureFromSourceGenerator::operator ()() QT_PREPEND_NAMESPACE(QBuffer) buffer(&m_sourceData); if (buffer.open(QIODevice::ReadOnly)) { QString suffix = m_url.toString(); - suffix = suffix.right(suffix.length() - suffix.lastIndexOf('.')); + suffix = suffix.right(suffix.length() - suffix.lastIndexOf(QLatin1Char('.'))); QStringList ext(suffix); -- cgit v1.2.1