diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-09 14:32:57 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-12 11:04:26 +0100 |
commit | a8e74cc2185e786ff0ae96135251354964417f95 (patch) | |
tree | 40056b951cf5fb3e900225fc448882a53a4e6b7f | |
parent | c10527b7c36a0c1ad49faaec5e4ea3dbb4f78b6c (diff) |
Remove subtype usage in ErrorObject
Change-Id: I77e23516270a2330ec22215aef6782a38d7fca09
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | src/qml/jsruntime/qv4errorobject.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4errorobject_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4managed.cpp | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp index 849c560024..eda371433a 100644 --- a/src/qml/jsruntime/qv4errorobject.cpp +++ b/src/qml/jsruntime/qv4errorobject.cpp @@ -76,7 +76,7 @@ Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype) Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const ValueRef message, ErrorType t) : Heap::Object(ic, prototype) { - subtype = t; + errorType = t; Scope scope(ic->engine); Scoped<QV4::ErrorObject> e(scope, this); @@ -98,7 +98,7 @@ Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, ErrorObject::ErrorType t) : Heap::Object(ic, prototype) { - subtype = t; + errorType = t; Scope scope(ic->engine); Scoped<QV4::ErrorObject> e(scope, this); @@ -120,7 +120,7 @@ Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, const QString &fileName, int line, int column, ErrorObject::ErrorType t) : Heap::Object(ic, prototype) { - subtype = t; + errorType = t; Scope scope(ic->engine); Scoped<QV4::ErrorObject> e(scope, this); diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h index 71a811c189..54762d8172 100644 --- a/src/qml/jsruntime/qv4errorobject_p.h +++ b/src/qml/jsruntime/qv4errorobject_p.h @@ -59,6 +59,8 @@ struct ErrorObject : Object { ErrorObject(InternalClass *ic, QV4::Object *prototype, const ValueRef message, ErrorType t = Error); ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, ErrorType t = Error); ErrorObject(InternalClass *ic, QV4::Object *prototype, const QString &message, const QString &fileName, int line, int column, ErrorType t = Error); + + ErrorType errorType; StackTrace stackTrace; String *stack; }; @@ -269,7 +271,7 @@ struct URIErrorPrototype : ErrorObject inline SyntaxErrorObject *ErrorObject::asSyntaxError() { - return subtype() == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0; + return d()->errorType == QV4::Heap::ErrorObject::SyntaxError ? static_cast<SyntaxErrorObject *>(this) : 0; } } diff --git a/src/qml/jsruntime/qv4managed.cpp b/src/qml/jsruntime/qv4managed.cpp index 9dc583bbf7..668e7d296d 100644 --- a/src/qml/jsruntime/qv4managed.cpp +++ b/src/qml/jsruntime/qv4managed.cpp @@ -100,7 +100,7 @@ QString Managed::className() const s = "RegExp"; break; case Type_ErrorObject: - switch (Heap::ErrorObject::ErrorType(subtype())) { + switch (static_cast<Heap::ErrorObject *>(d())->errorType) { case Heap::ErrorObject::Error: s = "Error"; break; |