New way to open debug consoles
Replace broken old utils.debug(...) (since the utils.js → Utils.qml transition) with a declarative approach: a console can now be opened with by placing a `DebugConsoleLoader {}` anywhere. mainUI has a default console opened by F1/alt-shit-c when no other console is loaded.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../../Base"
|
||||
import "../../.."
|
||||
|
||||
HRowLayout {
|
||||
id: eventContent
|
||||
@@ -40,8 +41,13 @@ HRowLayout {
|
||||
|
||||
TapHandler {
|
||||
enabled: debugMode
|
||||
onDoubleTapped:
|
||||
utils.debug(eventContent, null, con => { con.runJS("json()") })
|
||||
onDoubleTapped: debugConsoleLoader.toggle()
|
||||
}
|
||||
|
||||
DebugConsoleLoader {
|
||||
id: debugConsoleLoader
|
||||
active: false
|
||||
onLoaded: item.runJS("json()")
|
||||
}
|
||||
|
||||
Item {
|
||||
|
Reference in New Issue
Block a user