aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-29 01:00:09 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-01-29 13:31:19 +0000
commita4fe2d92099e33da39ad1216063a5869990eeab2 (patch)
treec7d39d2a43929cbabc1d636cd9a09e55ece9243a /src/qmlmodels
parent4b1c40570300248a7a7744aa7ddf8e77457bdc2b (diff)
parentdeac8afcbf28ebe621ec3b8495ca1c9ad76843a5 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp Change-Id: I133bfd4bd9dd6f704252c956c90f05e8a8a40d6a
Diffstat (limited to 'src/qmlmodels')
-rw-r--r--src/qmlmodels/qqmllistmodel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qmlmodels/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp
index fe8fba0cca..e07951cab3 100644
--- a/src/qmlmodels/qqmllistmodel.cpp
+++ b/src/qmlmodels/qqmllistmodel.cpp
@@ -2804,10 +2804,12 @@ bool QQmlListModelParser::applyProperty(
QV4::ScopedContext context(scope, QV4::QmlContext::create(v4->rootContext(), QQmlContextData::get(qmlContext(model->m_modelCache)), nullptr));
QV4::ScopedFunctionObject function(scope, QV4::FunctionObject::createScriptFunction(context, compilationUnit->runtimeFunctions[id]));
- QV4::ReturnedValue result = function->call(v4->globalObject, nullptr, 0);
-
QJSValue v;
- QJSValuePrivate::setValue(&v, v4, result);
+ QV4::ScopedValue result(scope, function->call(v4->globalObject, nullptr, 0));
+ if (v4->hasException)
+ v4->catchException();
+ else
+ QJSValuePrivate::setValue(&v, v4, result->asReturnedValue());
value.setValue<QJSValue>(v);
} else {
QByteArray script = scriptStr.toUtf8();