1
0

Merge pull request #8758 from accumulator/qml_error_dialogs

qml: use warning icon and error title for failure messagedialogs
This commit is contained in:
accumulator
2023-12-22 16:55:01 +01:00
committed by GitHub
7 changed files with 55 additions and 12 deletions

View File

@@ -441,6 +441,7 @@ ApplicationWindow
onError: (message) => {
var dialog = app.messageDialog.createObject(app, {
title: qsTr('Error'),
iconSource: Qt.resolvedUrl('../../icons/warning.png'),
text: message
})
dialog.open()
@@ -560,7 +561,11 @@ ApplicationWindow
}
function onWalletOpenError(error) {
console.log('wallet open error')
var dialog = app.messageDialog.createObject(app, { title: qsTr('Error'), 'text': error })
var dialog = app.messageDialog.createObject(app, {
title: qsTr('Error'),
iconSource: Qt.resolvedUrl('../../icons/warning.png'),
text: error
})
dialog.open()
}
function onAuthRequired(method, authMessage) {
@@ -664,7 +669,10 @@ ApplicationWindow
qtobject.authProceed()
return
}
var dialog = app.messageDialog.createObject(app, {title: authMessage, yesno: true})
var dialog = app.messageDialog.createObject(app, {
title: authMessage,
yesno: true
})
dialog.accepted.connect(function() {
qtobject.authProceed()
})