summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dscustommaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/q3dscustommaterial.cpp')
-rw-r--r--src/runtime/q3dscustommaterial.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/runtime/q3dscustommaterial.cpp b/src/runtime/q3dscustommaterial.cpp
index 77b8cb3..592c19f 100644
--- a/src/runtime/q3dscustommaterial.cpp
+++ b/src/runtime/q3dscustommaterial.cpp
@@ -176,7 +176,21 @@ Q3DSCustomMaterial Q3DSCustomMaterialParser::parse(const QString &filename, bool
*ok = false;
return Q3DSCustomMaterial();
}
+ return parse(ok);
+}
+Q3DSCustomMaterial Q3DSCustomMaterialParser::parse(const QByteArray &data, bool *ok)
+{
+ if (!setSourceData(data)) {
+ if (ok != nullptr)
+ *ok = false;
+ return Q3DSCustomMaterial();
+ }
+ return parse(ok);
+}
+
+Q3DSCustomMaterial Q3DSCustomMaterialParser::parse(bool *ok)
+{
m_material = Q3DSCustomMaterial();
QXmlStreamReader *r = reader();