Show browser error messages to the user when available

This commit is contained in:
Michael Zanetti 2020-06-16 18:25:14 +02:00
parent 2fd696eae5
commit af7a3bd861

View File

@ -76,7 +76,11 @@ Page {
if (params.status !== "success") {
header.showInfo(params.error, true);
} else if (params.params.deviceError !== "DeviceErrorNoError") {
header.showInfo(qsTr("Error: %1").arg(params.params.deviceError), true)
if (params.params.displayMessage.length > 0) {
header.showInfo(qsTr("Error: %1").arg(params.params.displayMessage), true)
} else {
header.showInfo(qsTr("Error: %1").arg(params.params.deviceError), true)
}
}
}
engine.deviceManager.refreshBrowserItems(d.model)