From 59d1aaeec09a2f049b9c9865fa7e8c949c3653f6 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 9 May 2018 14:42:43 +0200 Subject: More debug information if we fail to load a component. --- components/kube/qml/ViewManager.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/kube/qml/ViewManager.qml b/components/kube/qml/ViewManager.qml index 517d8de3..f7d62c72 100644 --- a/components/kube/qml/ViewManager.qml +++ b/components/kube/qml/ViewManager.qml @@ -47,13 +47,19 @@ StackView { } } - var component = Qt.createComponent(extensionModel.findSource(name, "View.qml")) + var source = extensionModel.findSource(name, "View.qml"); + var component = Qt.createComponent(source) if (component.status == Component.Ready) { var o = component.createObject(root) viewDict[name] = o return o + } else if (component.status == Component.Error) { + console.error("Error while loading the component: ", source, "\nError: ", component.errorString()) + } else if (component.status == Component.Loading) { + console.error("Error while loading the component: ", source, "\nThe component is loading.) + } else { + console.error("Unknown error while loading the component: ", source) } - console.error("Failed to load component: \n", component.errorString()) return null } -- cgit v1.2.3