aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-01-18 14:32:00 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-01-18 14:58:30 +0100
commite98b48f55cdb57a369513100f82d7c1df99c1243 (patch)
tree327a296abcced1c8bb137eef652c6373ad46cf98 /src/qml/qml
parent1fa352f0e0a62d0b445e9a2a01953f8afca29858 (diff)
QQmlComponentPrivate::setInitialProperties: Do not silently swallow exceptions
Instead, log them with qmlWarning. Change-Id: Icde7397085841a84aca8a81c716d552c4cd4485a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index f35c3011d3..d1aa2a09db 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1387,13 +1387,13 @@ void QQmlComponentPrivate::setInitialProperties(QV4::ExecutionEngine *engine, QV
}
}
if (engine->hasException || !object) {
- engine->hasException = false;
+ qmlWarning(createdComponent, engine->catchExceptionAsQmlError());
continue;
}
name = engine->newString(properties.last());
object->put(name, val);
if (engine->hasException) {
- engine->hasException = false;
+ qmlWarning(createdComponent, engine->catchExceptionAsQmlError());
continue;
} else if (isTopLevelProperty) {
auto prop = removePropertyFromRequired(createdComponent, name->toQString(), requiredProperties);