| 170 | } |
| 171 | |
| 172 | static void updateConnectionStatus(QTableWidget *table) |
| 173 | { |
| 174 | for (int row = 0; row < table->rowCount(); row++) { |
| 175 | auto item = table->item(row, 0); |
| 176 | if (!item) { |
| 177 | continue; |
| 178 | } |
| 179 | |
| 180 | auto weakConnection = |
| 181 | GetWeakMqttConnectionByQString(item->text()); |
| 182 | auto connection = weakConnection.lock(); |
| 183 | if (!connection) { |
| 184 | continue; |
| 185 | } |
| 186 | |
| 187 | UpdateItemTableRow(table, row, |
| 188 | getCellLabels(connection.get(), false)); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | static void setupTab(QTabWidget *tab) |
| 193 | { |
no test coverage detected