From 9ccdc189c7e39b8d4f645f082daa3a5e3fedc5b7 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 23 Mar 2017 11:35:18 +0100 Subject: 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 --- src/quicktemplates2/qquickstackelement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(); } -- cgit v1.2.3