summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scxml/qscxmlecmascriptdatamodel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/scxml/qscxmlecmascriptdatamodel.cpp b/src/scxml/qscxmlecmascriptdatamodel.cpp
index 7222291..92e3cec 100644
--- a/src/scxml/qscxmlecmascriptdatamodel.cpp
+++ b/src/scxml/qscxmlecmascriptdatamodel.cpp
@@ -283,13 +283,20 @@ private: // Uses private API
}
QV4::ScopedString s(scope, engine->newString(name));
+#if Q_QML_PRIVATE_API_VERSION < 2
uint idx = s->asArrayIndex();
if (idx < UINT_MAX) {
+#else
+ QV4::ScopedPropertyKey key(scope, s->toPropertyKey());
+ if (key->isArrayIndex()) {
+#endif
Q_UNIMPLEMENTED();
return;
}
+#if Q_QML_PRIVATE_API_VERSION < 2
s->makeIdentifier();
+#endif
QV4::ScopedValue v(scope, QJSValuePrivate::convertedToValue(engine, value));
o->defineReadonlyProperty(s, v);
if (engine->hasException)
@@ -317,8 +324,13 @@ private: // Uses private API
}
QV4::ScopedString s(scope, engine->newString(name));
+#if Q_QML_PRIVATE_API_VERSION < 2
uint idx = s->asArrayIndex();
if (idx < UINT_MAX) {
+#else
+ QV4::ScopedPropertyKey key(scope, s->toPropertyKey());
+ if (key->isArrayIndex()) {
+#endif
Q_UNIMPLEMENTED();
return SetPropertyFailedForAnotherReason;
}