Commit afa18ab7 authored by Nicolas Fella's avatar Nicolas Fella

[kcm] Show account creation error in the UI

Display the error message we get from the account creation job in the UI instead of silently failing.

CCBUG: 420280
(cherry picked from commit 619f6102)
parent d4a943ae
......@@ -31,6 +31,13 @@ ScrollViewKCM {
id: root
title: i18n("Add New Account")
header: Kirigami.InlineMessage {
id: errorMessage
type: Kirigami.MessageType.Error
showCloseButton: true
visible: false
}
view: ListView {
clip: true
......@@ -90,7 +97,15 @@ ScrollViewKCM {
Component {
id: jobComponent
KAccounts.CreateAccountJob {
onFinished: kcm.pop()
onFinished: {
// Don't close when there is an error to show an error message
if (error == 0) {
kcm.pop()
} else {
errorMessage.text = errorText
errorMessage.visible = true
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment