diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-28 11:12:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-28 13:15:58 +0000 |
commit | 1acbd8b24046bce1f1178f9eb7d5ad96e5abed97 (patch) | |
tree | 434aba73075a174d2a3f3f6ff934bd16297d6eb1 | |
parent | 67d9d69b97c8c2db54974850783d0d10292f63b5 (diff) |
Adapt to internal QtQml API changes
After commit 3e1bb90da4c44455c8c307e01876cc2127bdb15c, query is now
called getOwnProperty.
Task-number: QTBUG-69180
Change-Id: Ie24b17c1d710cead9cbe4feece7a28d7fa926a0e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-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); |