aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qmljs/qmljs.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index c381d702e1..5d7d065b50 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -64,9 +64,9 @@ using namespace QV4;
struct Print: FunctionObject
{
- struct Data : FunctionObject::Data {
+ struct Data : Heap::FunctionObject {
Data(ExecutionContext *scope)
- : FunctionObject::Data(scope, QStringLiteral("print")) {
+ : Heap::FunctionObject(scope, QStringLiteral("print")) {
setVTable(staticVTable());
}
};
@@ -89,9 +89,9 @@ DEFINE_OBJECT_VTABLE(Print);
struct GC: public FunctionObject
{
- struct Data : FunctionObject::Data {
+ struct Data : Heap::FunctionObject {
Data(ExecutionContext *scope)
- : FunctionObject::Data(scope, QStringLiteral("gc"))
+ : Heap::FunctionObject(scope, QStringLiteral("gc"))
{
setVTable(staticVTable());
}
@@ -116,7 +116,7 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::ValueRef except
QV4::ScopedValue ex(scope, *exception);
QV4::ErrorObject *e = ex->asErrorObject();
if (!e) {
- std::cerr << "Uncaught exception: " << qPrintable(ex->toString(ctx)->toQString()) << std::endl;
+ std::cerr << "Uncaught exception: " << qPrintable(ex->toQString()) << std::endl;
} else {
QV4::ScopedString m(scope, scope.engine->newString(QStringLiteral("message")));
QV4::ScopedValue message(scope, e->get(m.getPointer()));
@@ -208,13 +208,13 @@ int main(int argc, char *argv[])
result = script.run();
if (scope.engine->hasException) {
QV4::StackTrace trace;
- QV4::ScopedValue ex(scope, ctx->catchException(&trace));
+ QV4::ScopedValue ex(scope, scope.engine->catchException(&trace));
showException(ctx, ex, trace);
return EXIT_FAILURE;
}
if (!result->isUndefined()) {
if (! qgetenv("SHOW_EXIT_VALUE").isEmpty())
- std::cout << "exit value: " << qPrintable(result->toString(ctx)->toQString()) << std::endl;
+ std::cout << "exit value: " << qPrintable(result->toQString()) << std::endl;
}
} else {
std::cerr << "Error: cannot open file " << fn.toUtf8().constData() << std::endl;