diff options
-rw-r--r-- | components/kube/qml/ViewManager.qml | 10 |
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 | ||