summaryrefslogtreecommitdiffstats
path: root/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/sceneparsers/gltfexport/gltfexporter.cpp')
-rw-r--r--src/plugins/sceneparsers/gltfexport/gltfexporter.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
index 31808caa7..12c979019 100644
--- a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
+++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
@@ -186,11 +186,11 @@ inline void promoteColorsToRGBA(QJsonObject *obj)
QT_BEGIN_NAMESPACE
+namespace Qt3DRender {
+
using namespace Qt3DCore;
using namespace Qt3DExtras;
-namespace Qt3DRender {
-
Q_LOGGING_CATEGORY(GLTFExporterLog, "Qt3D.GLTFExport", QtWarningMsg)
const QString MATERIAL_DIFFUSE_COLOR = QStringLiteral("kd");
@@ -627,11 +627,7 @@ void GLTFExporter::parseMaterials()
if (material->effect()) {
QList<QParameter *> parameters = material->effect()->parameters();
for (auto param : parameters) {
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (param->value().metaType().id() == QMetaType::QColor) {
-#else
- if (param->value().type() == QMetaType::QColor) {
-#endif
QColor color = param->value().value<QColor>();
if (param->name() == MATERIAL_AMBIENT_COLOR) {
matInfo.colors.insert(QStringLiteral("ambient"), color);
@@ -1768,11 +1764,7 @@ void GLTFExporter::exportParameter(QJsonObject &jsonObj, const QString &name,
paramObj[typeStr] = GL_SAMPLER_2D;
paramObj[valueStr] = m_textureIdMap.value(textureVariantToUrl(variant));
} else {
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch (variant.metaType().id()) {
-#else
- switch (variant.type()) {
-#endif
case QMetaType::Bool:
paramObj[typeStr] = GL_BOOL;
paramObj[valueStr] = variant.toBool();
@@ -2044,11 +2036,7 @@ QString GLTFExporter::textureVariantToUrl(const QVariant &var)
void GLTFExporter::setVarToJSonObject(QJsonObject &jsObj, const QString &key, const QVariant &var)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch (var.metaType().id()) {
-#else
- switch (var.type()) {
-#endif
case QMetaType::Bool:
jsObj[key] = var.toBool();
break;