MCPcopy Create free account
hub / github.com/dannagle/PacketSender / on_requestPathEdit_lostFocus

Method on_requestPathEdit_lostFocus

src/mainwindow.cpp:1033–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1031
1032
1033void 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
1054void MainWindow::on_packetASCIIEdit_lostFocus()
1055{

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.80

Tested by

no test coverage detected