Fix CLI exit after unexpected stream termination

Fixes #939
This commit is contained in:
Cameron Gutman
2025-12-27 13:33:46 -06:00
parent f0bb1031d8
commit 21fb2832e1
2 changed files with 13 additions and 17 deletions
+7 -11
View File
@@ -67,20 +67,16 @@ Item {
// Re-enable GUI gamepad usage now // Re-enable GUI gamepad usage now
SdlGamepadKeyNavigation.enable() SdlGamepadKeyNavigation.enable()
if (quitAfter) { // Pop the StreamSegue off the stack if this is a GUI-based app launch
if (streamSegueErrorDialog.text) { if (!quitAfter) {
// Quit when the error dialog is acknowledged stackView.pop()
streamSegueErrorDialog.quitAfter = quitAfter
streamSegueErrorDialog.open()
} }
else {
// Quit immediately if (quitAfter && !streamSegueErrorDialog.text) {
// If this was a CLI launch without errors, exit now
Qt.quit() Qt.quit()
} }
} else { else {
// Exit this view
stackView.pop()
// Show the Qt window again after streaming // Show the Qt window again after streaming
window.visible = true window.visible = true
+4 -4
View File
@@ -1308,14 +1308,14 @@ private:
} catch (const QtNetworkReplyException&) { } catch (const QtNetworkReplyException&) {
} }
// Session is finished now
emit m_Session->sessionFinished(m_Session->m_PortTestResults);
}
// Exit the entire program if requested // Exit the entire program if requested
if (m_Session->m_ShouldExit) { if (m_Session->m_ShouldExit) {
QCoreApplication::instance()->quit(); QCoreApplication::instance()->quit();
} }
// Session is finished now
emit m_Session->sessionFinished(m_Session->m_PortTestResults);
}
} }
Session* m_Session; Session* m_Session;