summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-09 14:42:43 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-09 14:42:43 +0200
commit59d1aaeec09a2f049b9c9865fa7e8c949c3653f6 (patch)
treeb69fbf0c6a79a254805c4e16852a5755d6cefa85 /components
parent7cbea07358b608231067a43172bd4f5ea583b2c9 (diff)
downloadkube-59d1aaeec09a2f049b9c9865fa7e8c949c3653f6.tar.gz
kube-59d1aaeec09a2f049b9c9865fa7e8c949c3653f6.zip
More debug information if we fail to load a component.
Diffstat (limited to 'components')
-rw-r--r--components/kube/qml/ViewManager.qml10
1 files 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 {
47 } 47 }
48 } 48 }
49 49
50 var component = Qt.createComponent(extensionModel.findSource(name, "View.qml")) 50 var source = extensionModel.findSource(name, "View.qml");
51 var component = Qt.createComponent(source)
51 if (component.status == Component.Ready) { 52 if (component.status == Component.Ready) {
52 var o = component.createObject(root) 53 var o = component.createObject(root)
53 viewDict[name] = o 54 viewDict[name] = o
54 return o 55 return o
56 } else if (component.status == Component.Error) {
57 console.error("Error while loading the component: ", source, "\nError: ", component.errorString())
58 } else if (component.status == Component.Loading) {
59 console.error("Error while loading the component: ", source, "\nThe component is loading.)
60 } else {
61 console.error("Unknown error while loading the component: ", source)
55 } 62 }
56 console.error("Failed to load component: \n", component.errorString())
57 return null 63 return null
58 } 64 }
59 65