diff options
Diffstat (limited to 'src/plugins/sceneparsers/gltf/gltfimporter.cpp')
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfimporter.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index 69d4c8954..4f29cab06 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -239,8 +239,6 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; -using namespace Qt3DExtras; namespace { @@ -287,6 +285,9 @@ Qt3DRender::QFilterKey *buildFilterKey(const QString &key, const QJsonValue &val namespace Qt3DRender { +using namespace Qt3DCore; +using namespace Qt3DExtras; + Q_LOGGING_CATEGORY(GLTFImporterLog, "Qt3D.GLTFImport", QtWarningMsg); class GLTFRawTextureImage : public QAbstractTextureImage @@ -1050,9 +1051,9 @@ QMaterial *GLTFImporter::commonMaterial(const QJsonObject &jsonObj) } else { for (QVariantHash::const_iterator it = params.constBegin(), itEnd = params.constEnd(); it != itEnd; ++it) mat->setProperty(it.key().toUtf8(), it.value()); - } - renameFromJson(jsonObj, mat); + renameFromJson(jsonObj, mat); + } return mat; } @@ -1819,11 +1820,7 @@ void GLTFImporter::processJSONMesh(const QString &id, const QJsonObject &json) target->setProperty(propName.constData(), QVariant(size)); } } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const QMetaType propType = target->property(propName.constData()).metaType(); -#else - const QMetaType propType(target->property(propName.constData()).type()); -#endif if (propType.id() == QMetaType::Int) { target->setProperty(propName.constData(), QVariant(it.value().toInt())); } else { |