Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -r5a4a26f106ba03759e3a89b19690fa678f8a3aca -r2912750c8e787739f2cb2069fee1b33195a9ef54 --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 5a4a26f106ba03759e3a89b19690fa678f8a3aca) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 2912750c8e787739f2cb2069fee1b33195a9ef54) @@ -7,7 +7,7 @@ * * \file CloudSyncController.cpp * \author (last) Behrouz NematiPour - * \date (last) 07-Apr-2023 + * \date (last) 18-Jul-2023 * \author (original) Behrouz NematiPour * \date (original) 14-Oct-2021 * @@ -103,6 +103,9 @@ connect(&_ApplicationController , SIGNAL(didPOSTCloudSync(bool)), this , SLOT( onPOSTCloudSync(bool))); + connect(&_DeviceController , SIGNAL(didCryptSetupMount(bool)), + this , SLOT( onCryptSetupMount(bool))); + connect(&_DeviceController , SIGNAL(didWatchFileChange (const QString &)), this , SLOT( onWatchFileChange (const QString &))); connect(&_MessageDispatcher , SIGNAL(didActionReceive (GuiActionType , const QVariantList &)), @@ -193,10 +196,20 @@ void CloudSyncController::onPOSTCloudSync(bool vPass) { _postPass = vPass; - testReady(); } /*! + * \brief CloudSyncController::onCryptSetupMount + * \details This the handler for the DeviceController::onCryptSetupMount() + */ +void CloudSyncController::onCryptSetupMount(bool vPass) +{ + if ( vPass ) { + testReady(); + } +} + +/*! * \brief CloudSyncController::onWatchFileChange * \details This slot will be called when the Device Controller identifies any changes in the watched files. * \param vFile - watched file @@ -670,8 +683,8 @@ QVariantList args ; Errors_Enum error = eError_Unknown; qint32 messageID = UI2CS(static_cast( eMessageID_TxReport )); - - if ( ! isRegistered() ) { error = eError_NotRegistered ; args = { vFileName }; ok = false; goto lErr; } + // DEBUG ok = false; // using the ok bool which is true as the debug flag to bypass the registration on debug testing. + if ( ok && ! isRegistered() ) { error = eError_NotRegistered ; args = { vFileName }; ok = false; goto lErr; } sendUIBuff(makeUIBuff( messageID , { vFileName } )); return; @@ -687,7 +700,7 @@ */ bool CloudSyncController::sendMessage(const Message &vMessage) { bool ok = false; - + //DEBUG qDebug() << Q_FUNC_INFO << vMessage.id; // this function is used in sendUIResponse, therefore the message IDs which are responses should be implemented here. switch (vMessage.id) { case eMessageID_DeviceRegister : /* No Request/Response */ break; @@ -819,8 +832,8 @@ mTxCode = vMessage.params[0].trimmed(); if ( mTxCode.isEmpty() ) { toLog(eError_TxCodeEmpty , {}); ok = false; goto lOut; } - emit didTxCodeReceive ( mTxCode ); //DEBUG qDebug() << " ---------- " << mTxCode; + emit didTxCodeReceive ( mTxCode ); lOut: return ok;