From e78b389bc074301971e41e129ce0859cf64d3d81 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 22 May 2024 23:11:52 -0700 Subject: [PATCH] Fix passing incorrect 'this' pointer to quitRunningApp() This worked before due to Qt behavior that was changed in https://codereview.qt-project.org/c/qt/qtdeclarative/+/450393 to generate a warning in this situation. The old behavior remains the default, but this change avoids a warning in the logs. --- app/gui/AppView.qml | 2 +- app/gui/CliStartStreamSegue.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/gui/AppView.qml b/app/gui/AppView.qml index 8f2a0f9d..d27dcd73 100644 --- a/app/gui/AppView.qml +++ b/app/gui/AppView.qml @@ -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": () => appModel.quitRunningApp()} if (segueToStream) { // Store the session and app name if we're going to stream after // successfully quitting the old app. diff --git a/app/gui/CliStartStreamSegue.qml b/app/gui/CliStartStreamSegue.qml index 3bb2e95f..aba2abec 100644 --- a/app/gui/CliStartStreamSegue.qml +++ b/app/gui/CliStartStreamSegue.qml @@ -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": () => launcher.quitRunningApp()} stackView.push(component.createObject(stackView, params)) }