From 9fd4591a61df467362fa2f17cc2d506efd6bece3 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 17 Oct 2013 08:56:51 +0200 Subject: Remove internal method from public API QQmlError is public API and shouldn't expose an internal method. Change-Id: I7caf06af9340fefec5c96103395fe74acbf19497 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlerror.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/qml/qml/qqmlerror.cpp') diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp index 3a4179717a..ad95ecdf06 100644 --- a/src/qml/qml/qqmlerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -138,28 +138,6 @@ QQmlError::~QQmlError() delete d; d = 0; } -QQmlError QQmlError::catchJavaScriptException(QV4::ExecutionContext *context) -{ - QV4::StackTrace trace; - QV4::Scope scope(context); - QV4::ScopedValue exception(scope, context->catchException(&trace)); - QQmlError error; - if (!trace.isEmpty()) { - QV4::StackFrame frame = trace.first(); - error.setUrl(QUrl(frame.source)); - error.setLine(frame.line); - error.setColumn(frame.column); - } - QV4::Scoped errorObj(scope, exception); - if (!!errorObj && errorObj->asSyntaxError()) { - QV4::ScopedString m(scope, errorObj->engine()->newString("message")); - QV4::ScopedValue v(scope, errorObj->get(m)); - error.setDescription(v->toQStringNoThrow()); - } else - error.setDescription(exception->toQStringNoThrow()); - return error; -} - /*! Returns true if this error is valid, otherwise false. */ -- cgit v1.2.3