diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-11-07 18:38:44 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-08 12:18:11 +0100 |
commit | 46e54ea850de93ca46ad9e374714f5a30ddf7dfe (patch) | |
tree | 448a5a4732a97ba2b58e2793ec88c91cc4782633 /tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp | |
parent | ad320d873d27686ca0610ffd692f12131cc864ad (diff) |
Include correct line number when throwing an exception from a slot
Task-number: QTBUG-20344
Change-Id: I25be1520b55ce13d4e1c75e06effa1dee8530a7a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index 9213b61a3c..721c719911 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -101,6 +101,12 @@ public: void setWidth(int) { } }; +void MyQmlObject::v8function(QDeclarativeV8Function *args) +{ + const char *error = "Exception thrown from within QObject slot"; + v8::ThrowException(v8::Exception::Error(v8::String::New(error))); +} + static QJSValue script_api(QDeclarativeEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) |