Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -r4b7b6f9506d7c7ad4f611b8c417ed37d5f9a48ac -ra9a506f16293b28e582395f90a0cba2bcdc0b34c --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 4b7b6f9506d7c7ad4f611b8c417ed37d5f9a48ac) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision a9a506f16293b28e582395f90a0cba2bcdc0b34c) @@ -20,6 +20,7 @@ // Project #include "StorageGlobals.h" #include "FileHandler.h" +#include "ApplicationController.h" #include "Logger.h" #include "MSettings.h" #include "CloudSyncController.h" @@ -50,6 +51,16 @@ \details All the class signal/slot connections are defined here. */ void TreatmentLog::initConnections() { + connect(&_ApplicationController , + QOverload< const AdjustSerialNumberHDResponseData & >::of( &ApplicationController::didActionReceive ), + [ this ] ( const AdjustSerialNumberHDResponseData &vData ) { + // The serial number is going to be recieved from HD + // on POST or on request + // and will be used for the device ID + // which we designed initially to be different. + _deviceID = vData.mSerialNumber; + }); + connect(&_Logger , SIGNAL(didLogPathSet(Logger::LogType, const QString &)), this , SLOT( onLogPathSet(Logger::LogType, const QString &))); @@ -112,8 +123,6 @@ _valuesLog.clear(); for (int i = 0; i < eTreatmentLogIndexCount; i++) _valuesLog << ""; - _deviceID = mStrText.arg(vData.mDeviceID ); - _valuesLog[ePatientID ] = vPatientID.trimmed() ; _valuesLog[eBloodFlowRate ] = mStrText.arg(vData.mBloodFlowRate ); _valuesLog[eDialysateFlowRate ] = mStrText.arg(vData.mDialysateFlowRate );