diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-02-04 11:00:08 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-02-10 15:28:33 +0000 |
commit | 9ca3c97c1919188adbe05821dd366562a6ad2c58 (patch) | |
tree | 3223877bbd933e69dc304d10f4ce70a8ebb8a02e /src/qml | |
parent | 151fd896164f6dc8bd74ac77078e2d1820c50813 (diff) |
QQmlComponent: mention errors when component is prematurely destructed
Change-Id: Idb5dc9e68b92cb6b20b4e8df44ed6ac55aaa9568
Task-number: QTBUG-45745
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 22a54d732e..9b52a951af 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -372,6 +372,13 @@ QQmlComponent::~QQmlComponent() if (d->state.completePending) { qWarning("QQmlComponent: Component destroyed while completion pending"); + + if (isError()) { + qWarning() << "This may have been caused by one of the following errors:"; + foreach (const QQmlError &error, d->state.errors) + qWarning().nospace().noquote() << QLatin1String(" ") << error; + } + d->completeCreate(); } |