summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-10-29 09:33:04 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-11-07 13:34:25 +0100
commit25b1c54aac84564a3e5f47c1afc1aab25baebf45 (patch)
treee0061d74bb52938555695640c0478230b6578838
parentbfeba7c431fd7bebbf7163853cb2e6a327e188aa (diff)
Don't try to load binary json GLTF data if !QT_CONFIG(binaryjson)
Change-Id: Ic42a59c1dfea50ba152922bf4edbddc64b2d0f73 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/core/resources/qloadgltf_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/resources/qloadgltf_p.h b/src/core/resources/qloadgltf_p.h
index 39601400a..be7ee0d5f 100644
--- a/src/core/resources/qloadgltf_p.h
+++ b/src/core/resources/qloadgltf_p.h
@@ -60,11 +60,13 @@
inline QJsonDocument qLoadGLTF(const QByteArray &gltfData)
{
+#if QT_CONFIG(binaryjson)
{
QJsonDocument sceneDocument = QJsonDocument::fromBinaryData(gltfData);
if (!sceneDocument.isNull())
return sceneDocument;
}
+#endif
{
const QCborValue cbor = QCborValue::fromCbor(gltfData);
if (cbor.isMap())