| 1031 | |
| 1032 | |
| 1033 | void MainWindow::on_requestPathEdit_lostFocus() |
| 1034 | { |
| 1035 | QDEBUG(); |
| 1036 | |
| 1037 | auto isHttp = ui->udptcpComboBox->currentText().toLower().contains("http"); |
| 1038 | |
| 1039 | QString quicktestURL = ui->requestPathEdit->text().trimmed().toLower(); |
| 1040 | auto checkHTTP = quicktestURL.startsWith("http://") || quicktestURL.startsWith("https://"); |
| 1041 | |
| 1042 | if(isHttp && checkHTTP) { |
| 1043 | |
| 1044 | ui->packetPortEdit->setText(QString::number(Packet::getPortFromURL(quicktestURL))); |
| 1045 | ui->packetIPEdit->setText(Packet::getHostFromURL(quicktestURL)); |
| 1046 | ui->requestPathEdit->setText(Packet::getRequestFromURL(quicktestURL)); |
| 1047 | int index = ui->udptcpComboBox->findText(Packet::getMethodFromURL(quicktestURL)); |
| 1048 | if(index >= 0) { |
| 1049 | ui->udptcpComboBox->setCurrentIndex(index); |
| 1050 | } |
| 1051 | } |
| 1052 | } |
| 1053 | |
| 1054 | void MainWindow::on_packetASCIIEdit_lostFocus() |
| 1055 | { |