debugConsole: add toggle() conveniance function

This commit is contained in:
miruka
2020-04-01 05:37:44 -04:00
parent f838bdf96d
commit 4602366b9c
3 changed files with 15 additions and 8 deletions

View File

@@ -221,11 +221,8 @@ HColumnLayout {
HMenuItem {
icon.name: "debug"
text: qsTr("Debug this event")
onTriggered: {
mainUI.debugConsole.visible = true
mainUI.debugConsole.target = eventContent
mainUI.debugConsole.runJS("t.parent.json()", false)
}
onTriggered:
mainUI.debugConsole.toggle(eventContent, "t.parent.json()")
}
HMenuItemPopupSpawner {