summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-07-03 15:11:28 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-12 06:33:36 +0000
commit6a6ad4a4dcaf151f1be62677227555b1961b20df (patch)
treed71e80785d801c871a4e712cbd2c762fe3c62792 /src
parentdbb81a15297f21bd4a5e3271dfdf66bd507333ed (diff)
Adjust to internal API changes in qtdeclarative
Task-number: QTBUG-69367 Change-Id: I2e01feebb0166b8279cf28e4cab39d8caaed1d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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;
}