diff options
-rw-r--r-- | src/core/qscene.cpp | 3 | ||||
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfimporter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sceneparsers/gltfexport/gltfexporter.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp index 1fcfeaac7..912356358 100644 --- a/src/core/qscene.cpp +++ b/src/core/qscene.cpp @@ -220,7 +220,8 @@ bool QScene::hasEntityForComponent(QNodeId componentUuid, QNodeId entityUuid) { Q_D(QScene); QReadLocker lock(&d->m_lock); - return d->m_componentToEntities.values(componentUuid).contains(entityUuid); + const auto range = d->m_componentToEntities.equal_range(componentUuid); + return std::find(range.first, range.second, entityUuid) != range.second; } QScene::NodePropertyTrackData QScene::lookupNodePropertyTrackData(QNodeId id) const diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index c026594bf..4544bc5c3 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -1072,7 +1072,7 @@ void GLTFImporter::cleanup() m_shaderPaths.clear(); delete_if_without_parent(m_programs); m_programs.clear(); - for (auto params : m_techniqueParameters.values()) + for (auto params : qAsConst(m_techniqueParameters)) delete_if_without_parent(params); m_techniqueParameters.clear(); delete_if_without_parent(m_techniques); diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp index 7332fa6b5..ba0649d3b 100644 --- a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp +++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp @@ -1249,7 +1249,7 @@ bool GLTFExporter::saveScene() m_obj["meshes"] = meshes; QJsonObject cameras; - for (auto camInfo : m_cameraInfo.values()) { + for (auto camInfo : qAsConst(m_cameraInfo)) { QJsonObject camera; QJsonObject proj; proj["znear"] = camInfo.znear; |