From f4f478973f797f91e57256be34f452d30ab5b43c Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 17 Oct 2019 02:44:56 -0700 Subject: [PATCH] Fix a crash in message delegate menu involving nil reference. --- imports/Spectral/Component/Timeline/AudioDelegate.qml | 2 +- imports/Spectral/Component/Timeline/FileDelegate.qml | 2 +- imports/Spectral/Component/Timeline/ImageDelegate.qml | 2 +- imports/Spectral/Component/Timeline/MessageDelegate.qml | 2 +- imports/Spectral/Component/Timeline/VideoDelegate.qml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/imports/Spectral/Component/Timeline/AudioDelegate.qml b/imports/Spectral/Component/Timeline/AudioDelegate.qml index 3483476a2..2a7d563b5 100644 --- a/imports/Spectral/Component/Timeline/AudioDelegate.qml +++ b/imports/Spectral/Component/Timeline/AudioDelegate.qml @@ -133,7 +133,7 @@ RowLayout { id: messageMouseArea onSecondaryClicked: { - var contextMenu = fileDelegateContextMenu.createObject(ApplicationWindow.overlay) + var contextMenu = fileDelegateContextMenu.createObject(root) contextMenu.viewSource.connect(function() { messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open() }) diff --git a/imports/Spectral/Component/Timeline/FileDelegate.qml b/imports/Spectral/Component/Timeline/FileDelegate.qml index dd4a81760..997ff895e 100644 --- a/imports/Spectral/Component/Timeline/FileDelegate.qml +++ b/imports/Spectral/Component/Timeline/FileDelegate.qml @@ -159,7 +159,7 @@ RowLayout { id: messageMouseArea onSecondaryClicked: { - var contextMenu = fileDelegateContextMenu.createObject(ApplicationWindow.overlay) + var contextMenu = fileDelegateContextMenu.createObject(root) contextMenu.viewSource.connect(function() { messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open() }) diff --git a/imports/Spectral/Component/Timeline/ImageDelegate.qml b/imports/Spectral/Component/Timeline/ImageDelegate.qml index 3432822ca..228b3ec44 100644 --- a/imports/Spectral/Component/Timeline/ImageDelegate.qml +++ b/imports/Spectral/Component/Timeline/ImageDelegate.qml @@ -153,7 +153,7 @@ RowLayout { onPrimaryClicked: fullScreenImage.createObject(parent, {"filename": eventId, "localPath": currentRoom.urlToDownload(eventId)}).showFullScreen() onSecondaryClicked: { - var contextMenu = imageDelegateContextMenu.createObject(ApplicationWindow.overlay) + var contextMenu = imageDelegateContextMenu.createObject(root) contextMenu.viewSource.connect(function() { messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open() }) diff --git a/imports/Spectral/Component/Timeline/MessageDelegate.qml b/imports/Spectral/Component/Timeline/MessageDelegate.qml index 8687e9022..ae141f529 100644 --- a/imports/Spectral/Component/Timeline/MessageDelegate.qml +++ b/imports/Spectral/Component/Timeline/MessageDelegate.qml @@ -98,7 +98,7 @@ ColumnLayout { id: messageMouseArea onSecondaryClicked: { - var contextMenu = messageDelegateContextMenu.createObject(ApplicationWindow.overlay) + var contextMenu = messageDelegateContextMenu.createObject(root) contextMenu.viewSource.connect(function() { messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open() }) diff --git a/imports/Spectral/Component/Timeline/VideoDelegate.qml b/imports/Spectral/Component/Timeline/VideoDelegate.qml index 3a595ddf5..70b57b9d6 100644 --- a/imports/Spectral/Component/Timeline/VideoDelegate.qml +++ b/imports/Spectral/Component/Timeline/VideoDelegate.qml @@ -218,7 +218,7 @@ RowLayout { } onSecondaryClicked: { - var contextMenu = imageDelegateContextMenu.createObject(ApplicationWindow.overlay) + var contextMenu = imageDelegateContextMenu.createObject(root) contextMenu.viewSource.connect(function() { messageSourceDialog.createObject(ApplicationWindow.overlay, {"sourceText": toolTip}).open() })