Index: sources/gui/qml/pages/settings/SettingsDecommission.qml =================================================================== diff -u -r46231564422493a69e3120459adefe1320eba255 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/settings/SettingsDecommission.qml (.../SettingsDecommission.qml) (revision 46231564422493a69e3120459adefe1320eba255) +++ sources/gui/qml/pages/settings/SettingsDecommission.qml (.../SettingsDecommission.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2023-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file SettingsDecommission.qml - * \author (last) Vy Duong - * \date (last) 09-Jun-2023 - * \author (original) Vy Duong - * \date (original) 09-Jun-2023 + * \author (last) Behrouz NematiPour + * \date (last) 28-Sep-2023 + * \author (original) Behrouz NematiPour + * \date (original) 18-Jul-2023 * */ @@ -25,16 +25,27 @@ * \brief SettingsDecommission is the screen * which asks for confirmation of performing a factory reset and doing it if confirmed */ -UserConfirmation{ id: _root +UserConfirmation { id : _root message : vDevice.decommissionEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase()) : qsTr("Please wait ...") itemIndex : SettingsStack.Decommission notificationText : vDevice.status confirmVisible : true confirmEnabled : vDevice.decommissionEnabled - onConfirmClicked : vDevice.decommission = "" // Need to set to something (ie: emtpy string) to trigger CPP code backVisible : true backEnabled : vDevice.decommissionEnabled + + onConfirmClicked : { + _confirmDialog.titleText = _root.title + _confirmDialog.open() + } + Connections { target: _confirmDialog + function onAccepted() { + if ( _confirmDialog.titleText == _root.title ) { // use the title as the indication of what has been confirmed and if that is related to this function. + vDevice.decommission = "" // Need to set to something (ie: emtpy string) to trigger CPP code + } + } + } }