diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-03-23 11:35:18 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-03-24 13:27:36 +0000 |
commit | 9ccdc189c7e39b8d4f645f082daa3a5e3fedc5b7 (patch) | |
tree | ece45471868a6749942001eb32d894cc4ce088b4 /src/quicktemplates2 | |
parent | 7c7b58c732dd30f7e98c5a0894e341f112a3124c (diff) |
StackView: improve the component creation errors
Previously it just dumped the error from the component, without telling
that it was anyhow related to StackView. Now it uses the standard QML
warning syntax and includes the name of the operation (push/replace).
Task-number: QTBUG-59634
Change-Id: Iea8df51f587c243ca065627e59bb0e5b5b526664
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r-- | src/quicktemplates2/qquickstackelement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickstackelement.cpp b/src/quicktemplates2/qquickstackelement.cpp index 2744c3e9..aace170b 100644 --- a/src/quicktemplates2/qquickstackelement.cpp +++ b/src/quicktemplates2/qquickstackelement.cpp @@ -152,7 +152,7 @@ bool QQuickStackElement::load(QQuickStackView *parent) if (status == QQmlComponent::Ready) load(view); else if (status == QQmlComponent::Error) - qWarning() << qPrintable(component->errorString().trimmed()); + QQuickStackViewPrivate::get(view)->warn(component->errorString().trimmed()); }); return true; } @@ -166,7 +166,7 @@ bool QQuickStackElement::load(QQuickStackView *parent) QQuickStackIncubator incubator(this); component->create(incubator, context); if (component->isError()) - qWarning() << qPrintable(component->errorString().trimmed()); + QQuickStackViewPrivate::get(parent)->warn(component->errorString().trimmed()); } else { initialize(); } |