| 194 | } |
| 195 | |
| 196 | void NetworkGame::slotNewConnection() |
| 197 | { |
| 198 | if(m_tcpSocket) return; |
| 199 | |
| 200 | static std::once_flag flag; |
| 201 | std::call_once(flag, [&]() { |
| 202 | QString text = QString("Client Connection Successful"); |
| 203 | ui->labConnectStatus->setText(text); |
| 204 | }); |
| 205 | |
| 206 | |
| 207 | if (m_tcpServer) { |
| 208 | m_tcpSocket = m_tcpServer->nextPendingConnection(); |
| 209 | connect(m_tcpSocket, SIGNAL(readyRead()), this, SLOT(slotRecv())); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | void NetworkGame::slotRecv() |
| 214 | { |
nothing calls this directly
no outgoing calls
no test coverage detected