: (param.isLocal() ? static_cast<QV4::CallContext *>(context)->locals + param.index \
: getValueRef(context, stack, param)))
#else
-# define VALUE(param) *getValueRef(context, stack, param, stackSize)
+# define VALUE(param) (*getValueRef(context, stack, param, stackSize))
# define VALUEPTR(param) getValueRef(context, stack, param, stackSize)
#endif
#define STOREVALUE(param, value) VALUE(param) = QV4::Value::fromReturnedValue((value))
}
}
#endif // DO_TRACE_INSTR
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_BEGIN_INSTR(CallProperty)
TRACE(property name, "%s, args=%u, argc=%u, this=%s", qPrintable(runtimeStrings[instr.name]->toQString()), instr.callData, instr.argc, (VALUE(instr.base)).toString(context)->toQString().toUtf8().constData());
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_END_INSTR(CallProperty)
MOTH_BEGIN_INSTR(CallElement)
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_BEGIN_INSTR(CallActivationProperty)
TRACE(args, "starting at %d, length %d", instr.args, instr.argc);
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_END_INSTR(CallBuiltinSetupArgumentsObject)
MOTH_BEGIN_INSTR(CreateValue)
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_END_INSTR(CreateValue)
MOTH_BEGIN_INSTR(CreateProperty)
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_BEGIN_INSTR(CreateActivationProperty)
TRACE(inline, "property name = %s, args = %d, argc = %d", runtimeStrings[instr.name]->toQString().toUtf8().constData(), instr.args, instr.argc);
- Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
+ Q_ASSERT(instr.callData + instr.argc + qOffsetOf(QV4::CallData, args)/sizeof(QV4::SafeValue) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
callData->tag = QV4::Value::Integer_Type;
callData->argc = instr.argc;
MOTH_END_INSTR(BinopContext)
MOTH_BEGIN_INSTR(AddNumberParams)
- QV4::Value lhs = VALUE(instr.lhs);
- QV4::Value rhs = VALUE(instr.rhs);
- VALUEPTR(instr.result)->setDouble(lhs.asDouble() + rhs.asDouble());
+ double lhs = VALUE(instr.lhs).asDouble();
+ double rhs = VALUE(instr.rhs).asDouble();
+ VALUEPTR(instr.result)->setDouble(lhs + rhs);
MOTH_END_INSTR(AddNumberParams)
MOTH_BEGIN_INSTR(MulNumberParams)
- QV4::Value lhs = VALUE(instr.lhs);
- QV4::Value rhs = VALUE(instr.rhs);
- VALUEPTR(instr.result)->setDouble(lhs.asDouble() * rhs.asDouble());
+ double lhs = VALUE(instr.lhs).asDouble();
+ double rhs = VALUE(instr.rhs).asDouble();
+ VALUEPTR(instr.result)->setDouble(lhs * rhs);
MOTH_END_INSTR(MulNumberParams)
MOTH_BEGIN_INSTR(SubNumberParams)
- QV4::Value lhs = VALUE(instr.lhs);
- QV4::Value rhs = VALUE(instr.rhs);
- VALUEPTR(instr.result)->setDouble(lhs.asDouble() - rhs.asDouble());
+ double lhs = VALUE(instr.lhs).asDouble();
+ double rhs = VALUE(instr.rhs).asDouble();
+ VALUEPTR(instr.result)->setDouble(lhs - rhs);
MOTH_END_INSTR(SubNumberParams)
MOTH_BEGIN_INSTR(Ret)
context->engine->stackPop(stackSize);
- QV4::Value &result = VALUE(instr.result);
// TRACE(Ret, "returning value %s", result.toString(context)->toQString().toUtf8().constData());
- return result.asReturnedValue();
+ return VALUE(instr.result).asReturnedValue();
MOTH_END_INSTR(Ret)
MOTH_BEGIN_INSTR(LoadThis)
return roleIndex;
}
-int ListModel::setExistingProperty(int elementIndex, const QString &key, const QV4::Value &data, QV8Engine *eng)
+int ListModel::setExistingProperty(int elementIndex, const QString &key, const QV4::ValueRef data, QV8Engine *eng)
{
int roleIndex = -1;
return roleIndex;
}
-int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::Value &d, QV8Engine *eng)
+int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::ValueRef d, QV8Engine *eng)
{
// Check if this key exists yet
int roleIndex = -1;
QV4::Scope scope(QV8Engine::getV4(eng));
// Add the value now
- if (QV4::String *s = d.asString()) {
- QString qstr = s->toQString();
+ if (d->asString()) {
+ QString qstr = d->toQString();
roleIndex = setStringProperty(role, qstr);
- } else if (d.isNumber()) {
- roleIndex = setDoubleProperty(role, d.asDouble());
- } else if (QV4::ArrayObject *a = d.asArrayObject()) {
+ } else if (d->isNumber()) {
+ roleIndex = setDoubleProperty(role, d->asDouble());
+ } else if (d->asArrayObject()) {
+ QV4::ScopedArrayObject a(scope, d);
if (role.type == ListLayout::Role::List) {
QV4::Scope scope(a->engine());
QV4::Scoped<QV4::Object> o(scope);
} else {
qmlInfo(0) << QString::fromLatin1("Can't assign to existing role '%1' of different type [%2 -> %3]").arg(role.name).arg(roleTypeName(role.type)).arg(roleTypeName(ListLayout::Role::List));
}
- } else if (d.isBoolean()) {
- roleIndex = setBoolProperty(role, d.booleanValue());
- } else if (QV4::DateObject *dd = d.asDateObject()) {
- QDateTime dt = dd->toQDateTime();;
+ } else if (d->isBoolean()) {
+ roleIndex = setBoolProperty(role, d->booleanValue());
+ } else if (d->asDateObject()) {
+ QV4::Scoped<QV4::DateObject> dd(scope, d);
+ QDateTime dt = dd->toQDateTime();
roleIndex = setDateTimeProperty(role, dt);
- } else if (d.isObject()) {
+ } else if (d->isObject()) {
QV4::ScopedObject o(scope, d);
QV4::QObjectWrapper *wrapper = o->as<QV4::QObjectWrapper>();
if (role.type == ListLayout::Role::QObject && wrapper) {
} else if (role.type == ListLayout::Role::VariantMap) {
roleIndex = setVariantMapProperty(role, o, eng);
}
- } else if (d.isUndefined() || d.isNull()) {
+ } else if (d->isNullOrUndefined()) {
clearProperty(role);
}
int setVariantProperty(const ListLayout::Role &role, const QVariant &d);
- int setJsProperty(const ListLayout::Role &role, const QV4::Value &d, QV8Engine *eng);
+ int setJsProperty(const ListLayout::Role &role, const QV4::ValueRef d, QV8Engine *eng);
int setStringProperty(const ListLayout::Role &role, const QString &s);
int setDoubleProperty(const ListLayout::Role &role, double n);
void destroy();
int setOrCreateProperty(int elementIndex, const QString &key, const QVariant &data);
- int setExistingProperty(int uid, const QString &key, const QV4::Value &data, QV8Engine *eng);
+ int setExistingProperty(int uid, const QString &key, const QV4::ValueRef data, QV8Engine *eng);
QVariant getProperty(int elementIndex, int roleIndex, const QQmlListModel *owner, QV8Engine *eng);
ListModel *getListProperty(int elementIndex, const ListLayout::Role &role);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(qmlEngine(this));
QV4::Scope scope(v4);
QV4::ScopedCallData callData(scope, 1);
- callData->thisObject = QV4::Value::fromReturnedValue(QV4::QObjectWrapper::wrap(v4, this));
+ callData->thisObject = QV4::QObjectWrapper::wrap(v4, this);
foreach (int key, animationCallbacks.keys()) {
QV4::ScopedFunctionObject f(scope, animationCallbacks.value(key).value());
V4THROW_ERROR("Not a Context2D object");
#define qClamp(val, min, max) qMin(qMax(val, min), max)
#define CHECK_RGBA(c) (c == '-' || c == '.' || (c >=0 && c <= 9))
-QColor qt_color_from_string(const QV4::Value &name)
+QColor qt_color_from_string(const QV4::ValueRef name)
{
- QByteArray str = name.toQStringNoThrow().toUtf8();
+ QByteArray str = name->toQString().toUtf8();
char *p = str.data();
int len = str.length();
DEFINE_MANAGED_VTABLE(QQuickJSContext2DImageData);
-static QV4::Value qt_create_image_data(qreal w, qreal h, QV8Engine* engine, const QImage& image)
+static QV4::ReturnedValue qt_create_image_data(qreal w, qreal h, QV8Engine* engine, const QImage& image)
{
QQuickContext2DEngineData *ed = engineData(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine);
pixelData->image = image.format() == QImage::Format_ARGB32 ? image : image.convertToFormat(QImage::Format_ARGB32);
}
- QQuickJSContext2DImageData *imageData = new (v4->memoryManager) QQuickJSContext2DImageData(v4);
+ QV4::Scoped<QQuickJSContext2DImageData> imageData(scope, new (v4->memoryManager) QQuickJSContext2DImageData(v4));
imageData->pixelData = pixelData.asValue();
- return QV4::Value::fromObject(imageData);
+ return imageData.asReturnedValue();
}
//static script functions
if (pa) {
qreal w = pa->image.width();
qreal h = pa->image.height();
- return qt_create_image_data(w, h, engine, QImage()).asReturnedValue();
+ return qt_create_image_data(w, h, engine, QImage());
}
} else if (arg0->isString()) {
QImage image = r->context->createPixmap(QUrl(arg0->toQStringNoThrow()))->image();
- return qt_create_image_data(image.width(), image.height(), engine, image).asReturnedValue();
+ return qt_create_image_data(image.width(), image.height(), engine, image);
}
} else if (ctx->callData->argc == 2) {
qreal w = ctx->callData->args[0].toNumber();
V4THROW_DOM(DOMEXCEPTION_NOT_SUPPORTED_ERR, "createImageData(): invalid arguments");
if (w > 0 && h > 0)
- return qt_create_image_data(w, h, engine, QImage()).asReturnedValue();
+ return qt_create_image_data(w, h, engine, QImage());
else
V4THROW_DOM(DOMEXCEPTION_INDEX_SIZE_ERR, "createImageData(): invalid arguments");
}
V4THROW_DOM(DOMEXCEPTION_INDEX_SIZE_ERR, "getImageData(): Invalid arguments");
QImage image = r->context->canvas()->toImage(QRectF(x, y, w, h));
- QV4::Value imageData = qt_create_image_data(w, h, engine, image);
-
- return imageData.asReturnedValue();
+ return qt_create_image_data(w, h, engine, image);
}
return QV4::Encode::null();
}
bool ipvError = false;
args->setReturnValue(QV4::Encode::undefined());
- QV4::Value ipv = d->extractInitialPropertyValues(args, this, &ipvError);
+ QV4::Scope scope(args->v4engine());
+ QV4::ScopedValue ipv(scope, d->extractInitialPropertyValues(args, this, &ipvError));
if (ipvError)
return;
d->clear();
QUrl sourceUrl = d->resolveSourceUrl(args);
- if (!ipv.isUndefined()) {
+ if (!ipv->isUndefined()) {
d->disposeInitialPropertyValues();
d->initialPropertyValues = ipv.asReturnedValue();
d->qmlGlobalForIpv = args->qmlGlobal();
return context->resolvedUrl(QUrl(arg));
}
-QV4::Value QQuickLoaderPrivate::extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error)
+QV4::ReturnedValue QQuickLoaderPrivate::extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error)
{
QV4::Scope scope(args->v4engine());
QV4::ScopedValue valuemap(scope, QV4::Primitive::undefinedValue());
}
}
- return valuemap;
+ return valuemap.asReturnedValue();
}
#include <moc_qquickloader_p.cpp>
void setInitialState(QObject *o);
void disposeInitialPropertyValues();
QUrl resolveSourceUrl(QQmlV4Function *args);
- QV4::Value extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error);
+ QV4::ReturnedValue extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error);
virtual qreal getImplicitWidth() const;
virtual qreal getImplicitHeight() const;
QV4::ScopedString s(scope);
- QV4::Value vbold = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("bold")))));
- QV4::Value vcap = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("capitalization")))));
- QV4::Value vfam = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("family")))));
- QV4::Value vital = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("italic")))));
- QV4::Value vlspac = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("letterSpacing")))));
- QV4::Value vpixsz = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("pixelSize")))));
- QV4::Value vpntsz = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("pointSize")))));
- QV4::Value vstrk = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("strikeout")))));
- QV4::Value vundl = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("underline")))));
- QV4::Value vweight = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("weight")))));
- QV4::Value vwspac = QV4::Value::fromReturnedValue(obj->get((s = v4->newString(QStringLiteral("wordSpacing")))));
+ QV4::ScopedValue vbold(scope, obj->get((s = v4->newString(QStringLiteral("bold")))));
+ QV4::ScopedValue vcap(scope, obj->get((s = v4->newString(QStringLiteral("capitalization")))));
+ QV4::ScopedValue vfam(scope, obj->get((s = v4->newString(QStringLiteral("family")))));
+ QV4::ScopedValue vital(scope, obj->get((s = v4->newString(QStringLiteral("italic")))));
+ QV4::ScopedValue vlspac(scope, obj->get((s = v4->newString(QStringLiteral("letterSpacing")))));
+ QV4::ScopedValue vpixsz(scope, obj->get((s = v4->newString(QStringLiteral("pixelSize")))));
+ QV4::ScopedValue vpntsz(scope, obj->get((s = v4->newString(QStringLiteral("pointSize")))));
+ QV4::ScopedValue vstrk(scope, obj->get((s = v4->newString(QStringLiteral("strikeout")))));
+ QV4::ScopedValue vundl(scope, obj->get((s = v4->newString(QStringLiteral("underline")))));
+ QV4::ScopedValue vweight(scope, obj->get((s = v4->newString(QStringLiteral("weight")))));
+ QV4::ScopedValue vwspac(scope, obj->get((s = v4->newString(QStringLiteral("wordSpacing")))));
// pull out the values, set ok to true if at least one valid field is given.
- if (vbold.isBoolean()) {
- retn.setBold(vbold.booleanValue());
+ if (vbold->isBoolean()) {
+ retn.setBold(vbold->booleanValue());
if (ok) *ok = true;
}
- if (vcap.isInt32()) {
- retn.setCapitalization(static_cast<QFont::Capitalization>(vcap.integerValue()));
+ if (vcap->isInt32()) {
+ retn.setCapitalization(static_cast<QFont::Capitalization>(vcap->integerValue()));
if (ok) *ok = true;
}
- if (vfam.isString()) {
- retn.setFamily(vfam.toQStringNoThrow());
+ if (vfam->isString()) {
+ retn.setFamily(vfam->toQString());
if (ok) *ok = true;
}
- if (vital.isBoolean()) {
- retn.setItalic(vital.booleanValue());
+ if (vital->isBoolean()) {
+ retn.setItalic(vital->booleanValue());
if (ok) *ok = true;
}
- if (vlspac.isNumber()) {
- retn.setLetterSpacing(QFont::AbsoluteSpacing, vlspac.asDouble());
+ if (vlspac->isNumber()) {
+ retn.setLetterSpacing(QFont::AbsoluteSpacing, vlspac->asDouble());
if (ok) *ok = true;
}
- if (vpixsz.isInt32()) {
- retn.setPixelSize(vpixsz.integerValue());
+ if (vpixsz->isInt32()) {
+ retn.setPixelSize(vpixsz->integerValue());
if (ok) *ok = true;
}
- if (vpntsz.isNumber()) {
- retn.setPointSize(vpntsz.asDouble());
+ if (vpntsz->isNumber()) {
+ retn.setPointSize(vpntsz->asDouble());
if (ok) *ok = true;
}
- if (vstrk.isBoolean()) {
- retn.setStrikeOut(vstrk.booleanValue());
+ if (vstrk->isBoolean()) {
+ retn.setStrikeOut(vstrk->booleanValue());
if (ok) *ok = true;
}
- if (vundl.isBoolean()) {
- retn.setUnderline(vundl.booleanValue());
+ if (vundl->isBoolean()) {
+ retn.setUnderline(vundl->booleanValue());
if (ok) *ok = true;
}
- if (vweight.isInt32()) {
- retn.setWeight(static_cast<QFont::Weight>(vweight.integerValue()));
+ if (vweight->isInt32()) {
+ retn.setWeight(static_cast<QFont::Weight>(vweight->integerValue()));
if (ok) *ok = true;
}
- if (vwspac.isNumber()) {
- retn.setWordSpacing(vwspac.asDouble());
+ if (vwspac->isNumber()) {
+ retn.setWordSpacing(vwspac->asDouble());
if (ok) *ok = true;
}
Q_ASSERT(thisObject);
QQmlData *otherDData = QQmlData::get(other);
- assert(otherDData);
+ Q_ASSERT(otherDData);
QV4::ScopedValue v(scope, otherDData->jsWrapper.value());
thisObject->defineDefaultProperty(QStringLiteral("autoTestStrongRef"), v);
}
}
-static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const char *source)
+static inline bool evaluate_error(QV8Engine *engine, const QV4::ValueRef o, const char *source)
{
QString functionSource = QLatin1String("(function(object) { return ") +
QLatin1String(source) + QLatin1String(" })");
}
static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o,
- const char *source, const QV4::Value &result)
+ const char *source, const QV4::ValueRef result)
{
QString functionSource = QLatin1String("(function(object) { return ") +
QLatin1String(source) + QLatin1String(" })");
return false;
QV4::ScopedValue value(scope);
- QV4::ScopedValue res(scope, result);
QV4::ScopedCallData d(scope, 1);
d->args[0] = o;
d->thisObject = engine->global();
value = function->call(d);
- return __qmljs_strict_equal(value, res);
+ return __qmljs_strict_equal(value, result);
} catch (QV4::Exception &e) {
e.accept(ctx);
}
return false;
}
-static inline QV4::Value evaluate(QV8Engine *engine, const QV4::Value & o,
+static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::ValueRef o,
const char *source)
{
QString functionSource = QLatin1String("(function(object) { return ") +
try {
QV4::Scoped<QV4::FunctionObject> function(scope, program.run());
if (!function)
- return QV4::Primitive::undefinedValue();
+ return QV4::Encode::undefined();
QV4::ScopedCallData d(scope, 1);
d->args[0] = o;
d->thisObject = engine->global();
- QV4::ScopedValue value(scope, function->call(d));
- return value;
+ return function->call(d);
} catch (QV4::Exception &e) {
e.accept(ctx);
}
- return QV4::Primitive::undefinedValue();
+ return QV4::Encode::undefined();
}
#define EVALUATE_ERROR(source) evaluate_error(engine, object, source)
QV8Engine *engine = ep->v8engine();
QV4::Scope scope(QV8Engine::getV4(engine));
- QV4::ScopedValue object(scope, QV4::QObjectWrapper::wrap(QV8Engine::getV4(engine), o));
+ QV4::ScopedValue qobjectwrapper(scope, QV4::QObjectWrapper::wrap(QV8Engine::getV4(engine), o));
+ QV4::ScopedValue object(scope, qobjectwrapper);
// Non-existent methods
o->reset();
o->reset();
{
- QV4::ScopedValue ret(scope, EVALUATE("object.method_NoArgs_QObject()"));
- QV4::QObjectWrapper *qobjectWrapper = ret->as<QV4::QObjectWrapper>();
+ QV4::Scoped<QV4::QObjectWrapper> qobjectWrapper(scope, EVALUATE("object.method_NoArgs_QObject()"));
QVERIFY(qobjectWrapper);
QCOMPARE(qobjectWrapper->object(), (QObject *)o);
QCOMPARE(o->error(), false);
o->reset();
{
- QV4::Value ret = EVALUATE("object.method_NoArgs_QScriptValue()");
- QVERIFY(ret.isString());
- QCOMPARE(ret.toQStringNoThrow(), QString("Hello world"));
+ QV4::ScopedValue ret(scope, EVALUATE("object.method_NoArgs_QScriptValue()"));
+ QVERIFY(ret->isString());
+ QCOMPARE(ret->toQStringNoThrow(), QString("Hello world"));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 6);
QCOMPARE(o->actuals().count(), 0);
}
o->reset();
- QVERIFY(EVALUATE_VALUE("object.method_NoArgs_QVariant()", QV4::Value::fromReturnedValue(engine->toString("QML rocks"))));
+ QVERIFY(EVALUATE_VALUE("object.method_NoArgs_QVariant()", QV4::ScopedValue(scope, engine->toString("QML rocks"))));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 7);
QCOMPARE(o->actuals().count(), 0);