Index: sources/view/VCreateTreatment.cpp =================================================================== diff -u -r2d09ae36f6b791e0415a87b6f14f582d4b434d7d -ra8cd1cdd576599c0c4196464a2fb7389e4e01f12 --- sources/view/VCreateTreatment.cpp (.../VCreateTreatment.cpp) (revision 2d09ae36f6b791e0415a87b6f14f582d4b434d7d) +++ sources/view/VCreateTreatment.cpp (.../VCreateTreatment.cpp) (revision a8cd1cdd576599c0c4196464a2fb7389e4e01f12) @@ -242,6 +242,12 @@ #endif } +/** + * @brief VCreateTreatment::enumToString + * Convenience functiont to convert an enum to a string + * @param vEnum - the enum value + * @return QString - the enum name + */ QString VCreateTreatment::enumToString(GuiRequestReasons vEnum) { const QMetaObject *mo = qt_getEnumMetaObject(vEnum); @@ -253,16 +259,16 @@ return QString("[%1] Unknown Rejection Reason").arg(vEnum); } +/** + * @brief VCreateTreatment::onFWValidationResponse + * Slot to handle a validation response from FW + * @param actionType The action type must be a create treatment response + * @param messageData The message data must contain the reject reason codes for all parameters + */ void VCreateTreatment::onFWValidationResponse(GuiActionType actionType, QVariantList messageData) { - Q_UNUSED(actionType) if (actionType != GuiActionType::CreateTreatmentRsp) - { - QString logMsg = tr("Invalid action type received in %0").arg(__FUNCTION__); - qDebug() << logMsg; - LOG_ERROR(logMsg); return; - } Model::TreatmentParametersResp response; TreatmentParametersRespData data = response.fromVariantList(messageData); @@ -289,7 +295,6 @@ emit heparinDispensingRate_ValidationFailed(enumToString(static_cast(data.heparinDispensingRate))); } if (data.heparinBolusVolume != Gui::GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { - success = false; emit heparinBolusVolume_ValidationFailed(enumToString(static_cast(data.heparinBolusVolume))); }