| 228 | } |
| 229 | |
| 230 | void PersistentConnection::initDTLS() |
| 231 | { |
| 232 | |
| 233 | this->dthread = nullptr; |
| 234 | QString tcpOrSSL = "TCP"; |
| 235 | if (sendPacket.isSSL()) { |
| 236 | tcpOrSSL = "SSL"; |
| 237 | } |
| 238 | if(sendPacket.isDTLS()){ |
| 239 | tcpOrSSL = "DTLS"; |
| 240 | } |
| 241 | setWindowTitle(tcpOrSSL + "://" + sendPacket.toIP + ":" + QString::number(sendPacket.port)); |
| 242 | |
| 243 | |
| 244 | reSendPacket.clear(); |
| 245 | if (sendPacket.repeat > 0) { |
| 246 | QDEBUG() << "This packet is repeating"; |
| 247 | reSendPacket = sendPacket; |
| 248 | } else { |
| 249 | |
| 250 | ui->stopResendingButton->hide(); |
| 251 | } |
| 252 | |
| 253 | |
| 254 | QApplication::processEvents(); |
| 255 | |
| 256 | |
| 257 | QSettings settings(SETTINGSFILE, QSettings::IniFormat); |
| 258 | bool appendCR = settings.value("appendCRcheck", true).toBool(); |
| 259 | ui->appendCRcheck->setChecked(appendCR); |
| 260 | |
| 261 | this->darkMode = Settings::useDark(); |
| 262 | |
| 263 | |
| 264 | ui->stopResendingButton->setStyleSheet(PersistentConnection::RESEND_BUTTON_STYLE); |
| 265 | ui->stopResendingButton->setFlat(true); |
| 266 | ui->stopResendingButton->setCursor(Qt::PointingHandCursor); |
| 267 | ui->stopResendingButton->setIcon(QIcon(PSLOGO)); |
| 268 | |
| 269 | connect(ui->stopResendingButton, &QPushButton::clicked, this, &PersistentConnection::cancelResends); |
| 270 | |
| 271 | } |
| 272 | |
| 273 | void PersistentConnection::refreshTimerTimeout() |
| 274 | { |