Index: sources/device/DeviceView.cpp =================================================================== diff -u -r5a4a26f106ba03759e3a89b19690fa678f8a3aca -r46231564422493a69e3120459adefe1320eba255 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 5a4a26f106ba03759e3a89b19690fa678f8a3aca) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 46231564422493a69e3120459adefe1320eba255) @@ -69,6 +69,8 @@ void VDevice::cryptSetupRequest(const QString &vCommand) { // DEBUG : qDebug() << "HERE Request" << vValue; + cryptSetupEnabled(false); + DeviceCryptSetupRequestData data; data.mCommand = vCommand; bool ok = false; @@ -88,11 +90,12 @@ // cryptsetup attribute will containe the command to be sent to the cryptsetup script // and the retrurned message can be the model message in vData.mMessage status(vData.mMessage); - cryptSetupEnabled(vData.mAccepted); accepted(vData.mAccepted); reason (vData.mReason ); + cryptSetupEnabled(true); + // has to be the last one response(true); } @@ -188,6 +191,9 @@ void VDevice::factoryResetRequest(const QString &vCommand) { Q_UNUSED(vCommand) // DEBUG : qDebug() << "HERE Request" << vCommand; + + factoryResetEnabled(false); + DeviceFactoryResetRequestData data; emit didAttributeRequest(data); } @@ -197,12 +203,11 @@ // this has to be called to let Gui to set to old value that device controller provided. status(vData.mMessage); - // Either the script exited successfully or the script failed and the reason is provided - factoryResetEnabled(vData.mAccepted || (!vData.mAccepted && vData.mReason!=0)); - accepted(vData.mAccepted); reason (vData.mReason ); + factoryResetEnabled(true); + // has to be the last one response(true); } @@ -215,6 +220,9 @@ void VDevice::decommissionRequest(const QString &vCommand) { Q_UNUSED(vCommand) // DEBUG : qDebug() << "HERE Request" << vCommand; + + decommissionEnabled(true); + DeviceDecommissionRequestData data; bool ok = false; data.mPassword = encryption::configurationsPassword( ok ); @@ -232,12 +240,11 @@ // this has to be called to let Gui to set to old value that device controller provided. status(vData.mMessage); - // Either the script exited successfully or the script failed and the reason is provided - decommissionEnabled(vData.mAccepted || (!vData.mAccepted && vData.mReason!=0)); - accepted(vData.mAccepted); reason (vData.mReason ); + decommissionEnabled(true); + // has to be the last one response(true); }