| 24 | } |
| 25 | |
| 26 | ControlMessageType ControlMessageTypeHelper::fromString(QString const& messageTypeString) { |
| 27 | if (messageTypeString == QStringLiteral("RECEIVED")) { |
| 28 | return ControlMessageType::RECEIVED; |
| 29 | } else if (messageTypeString == QStringLiteral("READ")) { |
| 30 | return ControlMessageType::READ; |
| 31 | } else if (messageTypeString == QStringLiteral("AGREE")) { |
| 32 | return ControlMessageType::AGREE; |
| 33 | } else if (messageTypeString == QStringLiteral("DISAGREE")) { |
| 34 | return ControlMessageType::DISAGREE; |
| 35 | } else if (messageTypeString == QStringLiteral("GROUP_SYNC_REQUEST")) { |
| 36 | return ControlMessageType::GROUP_SYNC_REQUEST; |
| 37 | } else { |
| 38 | throw openmittsu::exceptions::InternalErrorException() << "Unhandled ControlMessageType string representation, this should never happen: " << messageTypeString.toStdString(); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | } |
| 43 | } |
nothing calls this directly
no outgoing calls
no test coverage detected