* @brief Sets the MQTT protocol version by index. */
| 1501 | * @brief Sets the MQTT protocol version by index. |
| 1502 | */ |
| 1503 | void MQTT::Publisher::setMqttVersion(const quint8 version) |
| 1504 | { |
| 1505 | quint8 index = 0; |
| 1506 | for (auto i = m_mqttVersions.begin(); i != m_mqttVersions.end(); ++i) { |
| 1507 | if (index == version) { |
| 1508 | if (i.value() == m_protocolVersion) |
| 1509 | return; |
| 1510 | |
| 1511 | m_protocolVersion = i.value(); |
| 1512 | markConfigChanged(); |
| 1513 | return; |
| 1514 | } |
| 1515 | |
| 1516 | ++index; |
| 1517 | } |
| 1518 | } |
| 1519 | |
| 1520 | /** |
| 1521 | * @brief Sets the SSL protocol by index. |
no test coverage detected