From b46a3cf759d780053508975d3463a40880fdc86a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 5 Dec 2018 22:22:30 -0800 Subject: [PATCH] Show stream error dialog when launching from the CLI --- app/gui/StreamSegue.qml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/gui/StreamSegue.qml b/app/gui/StreamSegue.qml index 2edc941d7..d3a4dec16 100644 --- a/app/gui/StreamSegue.qml +++ b/app/gui/StreamSegue.qml @@ -73,7 +73,14 @@ Item { function sessionFinished() { if (quitAfter) { - Qt.quit() + if (errorDialog.text) { + // Quit when the error dialog is acknowledged + errorDialog.open() + } + else { + // Quit immediately + Qt.quit() + } } else { // Exit this view stackView.pop() @@ -164,8 +171,19 @@ Item { modality:Qt.WindowModal icon: StandardIcon.Critical standardButtons: StandardButton.Ok | StandardButton.Help + + onAccepted: { + if (quitAfter) { + Qt.quit() + } + } + onHelp: { Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"); + + if (quitAfter) { + Qt.quit() + } } } }