aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8bindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/v8/qv8bindings.cpp')
-rw-r--r--src/qml/qml/v8/qv8bindings.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qml/qml/v8/qv8bindings.cpp b/src/qml/qml/v8/qv8bindings.cpp
index d8624c7ad6..00134c5a51 100644
--- a/src/qml/qml/v8/qv8bindings.cpp
+++ b/src/qml/qml/v8/qv8bindings.cpp
@@ -169,23 +169,20 @@ void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags)
&isUndefined);
trace.event("writing V8 result");
- bool needsErrorData = false;
+ bool needsErrorLocationData = false;
if (!watcher.wasDeleted() && !destroyedFlag() && !hasError()) {
typedef QQmlPropertyPrivate PP;
- needsErrorData = !PP::writeBinding(*target, instruction->property, context, this, result,
+ needsErrorLocationData = !PP::writeBinding(*target, instruction->property, context, this, result,
isUndefined, flags);
}
if (!watcher.wasDeleted() && !destroyedFlag()) {
- if (needsErrorData) {
- delayedError()->error.setUrl(parent->url());
- delayedError()->error.setLine(instruction->line);
- delayedError()->error.setColumn(-1);
- }
+ if (needsErrorLocationData)
+ delayedError()->setErrorLocation(parent->url(), instruction->line, -1);
if (hasError()) {
- if (!delayedError()->addError(ep)) ep->warning(delayedError()->error);
+ if (!delayedError()->addError(ep)) ep->warning(this->error(context->engine));
} else {
clearError();
}