diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-22 08:16:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-22 08:16:47 (GMT) |
commit | ba602c39e2ab7c16dcb212c935dbacdf053c6623 (patch) | |
tree | afefdb2249373860a370fb6b92800787d9842da8 /src/declarative/qml/qmlexpression.cpp | |
parent | 95e370e53e24cf4210bdea07022a7c4d94cd8854 (diff) | |
download | Qt-ba602c39e2ab7c16dcb212c935dbacdf053c6623.zip Qt-ba602c39e2ab7c16dcb212c935dbacdf053c6623.tar.gz Qt-ba602c39e2ab7c16dcb212c935dbacdf053c6623.tar.bz2 |
Fix test failures.
Also add a test for script errors within signal handlers.
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r-- | src/declarative/qml/qmlexpression.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp index d2bf4a8..7f01f0e 100644 --- a/src/declarative/qml/qmlexpression.cpp +++ b/src/declarative/qml/qmlexpression.cpp @@ -319,10 +319,12 @@ QVariant QmlExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUnd QScriptValue svalue = data->expressionFunction.call(); if (isUndefined) - *isUndefined = svalue.isUndefined(); + *isUndefined = svalue.isUndefined() || scriptEngine->hasUncaughtException(); - if (scriptEngine->hasUncaughtException()) + if (scriptEngine->hasUncaughtException()) { printException(scriptEngine); + return QVariant(); + } if (secondaryScope) ctxtPriv->defaultObjects.removeAt(ctxtPriv->highPriorityCount); |