From 7147b54e3eba3089db825b91b74513205974e7df Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 27 Apr 2021 14:20:35 +0200 Subject: Document QQmlComponent::createWithInitialProperties() error handling Unlike create(), it can produce errors that should be checked. Change-Id: I78f2e58c8666eb45f6e850c43e3e97a448b2758e Reviewed-by: Fabian Kosmale (cherry picked from commit 4f0622f7f553cd841874f0efe65d7f13edeec216) Reviewed-by: Qt Cherry-pick Bot --- src/qml/qml/qqmlcomponent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index b44ad83b6e..18273ddcc0 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -839,6 +839,14 @@ QObject *QQmlComponent::create(QQmlContext *context) properties with \a initialProperties. \a context specifies the context where the object instance is to be created. + \omit + TODO: also mention errorString() when QTBUG-93239 is fixed + \endomit + + If any of the \c initialProperties cannot be set, \l isError() will return + \c true, and the \l errors() function can be used to + get detailed information about the error(s). + \sa QQmlComponent::create \since 5.14 */ -- cgit v1.2.3