added verification on port number
This commit is contained in:
+11
-4
@@ -824,10 +824,17 @@ void MainWindow::on_connectButton_clicked()
|
||||
uint port;
|
||||
|
||||
info(DEBUGMACRO, "on_connectButton_clicked() => Connexion button clicked");
|
||||
|
||||
server = ui->khistorycombobox->currentText();
|
||||
port = ui->portEdit->text().toUInt();
|
||||
populateList(server, port);
|
||||
if (port > 0 and port < 65535)
|
||||
{
|
||||
server = ui->khistorycombobox->currentText();
|
||||
populateList(server, port);
|
||||
}else
|
||||
{
|
||||
error(tr("Bad port number, correct it"));
|
||||
ui->portEdit->clear();
|
||||
ui->portEdit->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
// add parent in treeview
|
||||
@@ -1376,7 +1383,7 @@ bool MainWindow::on_DefaultSaveFolder_triggered()
|
||||
// if service not selected display a message
|
||||
if (this->connexion.service.isEmpty() or this->connexion.server.isEmpty())
|
||||
{
|
||||
warning(tr("Since the save path is linked to service, you need to select a service before you can select a folder and a service"));
|
||||
warning(tr("You need to select a service before you can select a folder"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user