diff options
-rw-r--r-- | src/scxml/qscxmlecmascriptdatamodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scxml/qscxmlecmascriptdatamodel.cpp b/src/scxml/qscxmlecmascriptdatamodel.cpp index 14a8b1a..810140e 100644 --- a/src/scxml/qscxmlecmascriptdatamodel.cpp +++ b/src/scxml/qscxmlecmascriptdatamodel.cpp @@ -323,7 +323,11 @@ private: // Uses private API return SetPropertyFailedForAnotherReason; } +#if defined(Q_QML_PRIVATE_API_VERSION) && Q_QML_PRIVATE_API_VERSION >= 1 + QV4::PropertyAttributes attrs = o->getOwnProperty(s->toPropertyKey()); +#else QV4::PropertyAttributes attrs = o->query(s); +#endif if (attrs.isWritable() || attrs.isEmpty()) { QV4::ScopedValue v(scope, QJSValuePrivate::convertedToValue(engine, value)); o->insertMember(s, v); |