diff options
Diffstat (limited to 'src/script/api/qscriptvalue.cpp')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index d8b4822..7136a85 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1743,7 +1743,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex, void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value, const PropertyFlags &flags) { - Q_D(const QScriptValue); + Q_D(QScriptValue); if (!d || !d->isObject()) return; if (value.engine() && (value.engine() != engine())) { @@ -1757,7 +1757,9 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value, JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex, /*checkDontDelete=*/false); } else { if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { - Q_ASSERT_X(false, Q_FUNC_INFO, "property getters and setters not implemented"); + // fall back to string-based setProperty(), since there is no + // JSC::JSObject::defineGetter(unsigned) + d->setProperty(JSC::Identifier::from(exec, arrayIndex), value, flags); } else { if (flags != QScriptValue::KeepExistingFlags) { // if (JSC::asObject(d->jscValue)->hasOwnProperty(exec, arrayIndex)) |