diff options
author | Marcus Hoffmann <bubu@bubu1.eu> | 2023-02-21 14:32:35 +0100 |
---|---|---|
committer | Marcus Hoffmann <bubu@bubu1.eu> | 2023-02-22 13:14:16 +0100 |
commit | 7c08d889906af610337a58a1166661f07e21b566 (patch) | |
tree | bcc4004b361969f377a6b5dc0ab0dfe05aeca050 /resources/qml/TimelineView.qml | |
parent | Translated using Weblate (Esperanto) (diff) | |
download | nheko-7c08d889906af610337a58a1166661f07e21b566.tar.xz |
print errors on failed dialog creation
Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
Diffstat (limited to '')
-rw-r--r-- | resources/qml/TimelineView.qml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 5accbcd6..aa39560a 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -423,11 +423,16 @@ Item { } function onShowRawMessageDialog(rawMessage) { - var dialog = Qt.createComponent("qrc:/qml/dialogs/RawMessageDialog.qml").createObject(timelineRoot, { - "rawMessage": rawMessage - }); - dialog.show(); - timelineRoot.destroyOnClose(dialog); + var component = Qt.createComponent("qrc:/qml/dialogs/RawMessageDialog.qml") + if (component.status == Component.Ready) { + var dialog = component.createObject(timelineRoot, { + "rawMessage": rawMessage + }); + dialog.show(); + timelineRoot.destroyOnClose(dialog); + } else { + console.error("Failed to create component: " + component.errorString()); + } } function onConfetti() |