Fix viewing apps and CLI streaming with Qt 5.11 and earlier

Arrow function expressions are not supported in QML until Qt 5.12.

Fixes #1350
Closes #1391
This commit is contained in:
Cameron Gutman 2024-09-15 14:39:34 -05:00
parent 96fb6ee5e9
commit 3e9e497203
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ CenteredGridView {
function quitApp() {
var component = Qt.createComponent("QuitSegue.qml")
var params = {"appName": appName, "quitRunningAppFn": () => appModel.quitRunningApp()}
var params = {"appName": appName, "quitRunningAppFn": function() { appModel.quitRunningApp() }}
if (segueToStream) {
// Store the session and app name if we're going to stream after
// successfully quitting the old app.

View File

@ -85,7 +85,7 @@ Item {
function quitApp() {
var component = Qt.createComponent("QuitSegue.qml")
var params = {"appName": appName, "quitRunningAppFn": () => launcher.quitRunningApp()}
var params = {"appName": appName, "quitRunningAppFn": function() { launcher.quitRunningApp() }}
stackView.push(component.createObject(stackView, params))
}