Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -r72a583bfbba42f8563fe20da150ddf479f204d16 -rd26aff743bca7eceb609ce5b30cea7cbfa39748f --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 72a583bfbba42f8563fe20da150ddf479f204d16) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision d26aff743bca7eceb609ce5b30cea7cbfa39748f) @@ -187,7 +187,14 @@ * Does nothing for now */ void CloudSyncController::onInitComplete() { - // Nothing for now + /* Development testability: + For testing if -C (gDisableCloudSyncFailStop) is used call the testReady + which is called + - when the encrypted partition is mounted + - a request for credential save received + testReady will set ok = true if -C (gDisableCloudSyncFailStop) is used. + */ + if ( gDisableCloudSyncFailStop ) testReady(); } /*! @@ -271,6 +278,7 @@ return ok; } _DeviceController.doAddWatch(_date_out_File, false); + _isWatching = true; // when the watch is added then the flag sets until next time the date changes. // since the buff files will be deleted on each power cycle, when the out buf is created it means the CloudSync is running. // we emit the ApplicationController to check the post.log for the CloudSync status check. return ok; @@ -536,8 +544,9 @@ _secSinceEpoch = _datetime.toSecsSinceEpoch(); _timeFormatted = _datetime.toString(_timeFormat); QString dateFormatted = _datetime.toString(_dateFormat); - if (_dateFormatted != dateFormatted) { + if (_dateFormatted != dateFormatted || ! _isWatching ) { _dateFormatted = dateFormatted; + _isWatching = false; // first time the date changes and CSctrl needs a new watch this flag need to be reset until the watch is added. // TODO: do we need to remove previous watch? addCSBuffWatch(); // bool out is not used here and error handling is internal to the addCSBuffWatch } @@ -1001,7 +1010,9 @@ void CloudSyncController::testReady() { bool ok = _postPass && isRegistered(); - emit didCloudSyncStatus( ok ); + emit didCloudSyncStatus( ok + || gDisableCloudSyncFailStop // Development testability + ); } /*!