Index: sources/gui/qml/pages/settings/SettingsFactoryReset.qml =================================================================== diff -u -r945614a28df94075bfccdfde7c876e4f53ed3410 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/settings/SettingsFactoryReset.qml (.../SettingsFactoryReset.qml) (revision 945614a28df94075bfccdfde7c876e4f53ed3410) +++ sources/gui/qml/pages/settings/SettingsFactoryReset.qml (.../SettingsFactoryReset.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 SettingsFactoryReset.qml * \author (last) Behrouz NematiPour - * \date (last) 11-May-2023 + * \date (last) 28-Sep-2023 * \author (original) Behrouz NematiPour - * \date (original) 11-May-2023 + * \date (original) 18-Jul-2023 * */ @@ -25,25 +25,26 @@ * \brief SettingsFactoryReset is the screen * which asks for confirmation of performing a factory reset and doing it if confirmed */ -UserConfirmation{ id: _root - title : qsTr("Factory Reset") - message : vDevice.factoryResetEnabled ? qsTr("Do you want to perform a factory reset?") - : qsTr("Resetting...") +UserConfirmation { id : _root + message : vDevice.factoryResetEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase()) + : qsTr("Please wait ...") itemIndex : SettingsStack.FactoryReset notificationText : vDevice.status - confirmVisible : true + confirmVisible : true confirmEnabled : vDevice.factoryResetEnabled - onConfirmClicked : vDevice.factoryReset = "" // Need to set to something (ie: emtpy string) to trigger CPP code backVisible : true backEnabled : vDevice.factoryResetEnabled - onBackClicked : _root.notificationText = "" - Connections{ target:vDevice - function onAcceptedChanged() { - if(_root.visible) { // indicate reset screen is shown - _root.notificationText = vDevice.status + 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.factoryReset = "" // Need to set to something (ie: emtpy string) to trigger CPP code } } }