diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-08-04 19:28:43 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-08-13 17:16:09 +0200 |
commit | 7c4a4f5ae0c02f57eb9073fa8f412a38b8f79363 (patch) | |
tree | a261cd36e44917e6a0c5abc3c1dc4f9f0545e4e5 /gui/qml | |
parent | abb65c7fcf570e69480ca70c92d4e271a78ffee2 (diff) |
Quit if there was an initializaton error
Let's close properly without segfaults :)
Diffstat (limited to 'gui/qml')
-rw-r--r-- | gui/qml/main.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml index b4aa19a..09bbab5 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -20,12 +20,14 @@ ApplicationWindow { donate.visible = true } if (ctx.errors ) { - // TODO consider disabling on/off buttons, or quit after closing the dialog if ( ctx.errors == "nohelpers" ) { showInitFailure(qsTr("Could not find helpers. Check your installation")) } else if ( ctx.errors == "nopolkit" ) { showInitFailure(qsTr("Could not find polkit agent.")) } else { + //: %1 -> application name + //: %2 -> error string + showInitFailure(qsTr("Got an error starting %1: %2").arg(ctx.appName).arg(ctx.errors)) console.debug(ctx.errors) } } @@ -248,5 +250,7 @@ ApplicationWindow { title: qsTr("Initialization Error") text: "" visible: false + onAccepted: backend.quit() + onRejected: backend.quit() } } |