! * returns \c true if there is a valid connection to an MQTT broker and the user has subscribed to at least 1 topic, * returns \c false otherwise. */
| 2645 | * returns \c false otherwise. |
| 2646 | */ |
| 2647 | bool ImportFileWidget::isMqttValid() { |
| 2648 | if (!m_client) |
| 2649 | return false; |
| 2650 | if (m_client->state() != QMqttClient::ClientState::Connected) |
| 2651 | return false; |
| 2652 | if (!m_subscriptionWidget->subscriptionCount()) |
| 2653 | return false; |
| 2654 | if (this->currentFileType() != AbstractFileFilter::FileType::Ascii) |
| 2655 | return false; |
| 2656 | |
| 2657 | return true; |
| 2658 | } |
| 2659 | |
| 2660 | /*! |
| 2661 | *\brief called when the client connects to the broker successfully. |
no test coverage detected