| 367 | } |
| 368 | |
| 369 | void RemoteManager::addNewHost() |
| 370 | { |
| 371 | QString host = ui->hostname->text().trimmed(); |
| 372 | if(!host.isEmpty()) |
| 373 | { |
| 374 | bool found = false; |
| 375 | |
| 376 | RemoteHost h = m_Ctx.Config().GetRemoteHost(host); |
| 377 | |
| 378 | if(!h.IsValid()) |
| 379 | { |
| 380 | h = RemoteHost((rdcstr)host); |
| 381 | h.SetRunCommand(ui->runCommand->text().trimmed()); |
| 382 | |
| 383 | m_Ctx.Config().AddRemoteHost(h); |
| 384 | m_Ctx.Config().Save(); |
| 385 | |
| 386 | addHost(h); |
| 387 | } |
| 388 | } |
| 389 | ui->hostname->setText(host); |
| 390 | on_hostname_textEdited(host); |
| 391 | } |
| 392 | |
| 393 | void RemoteManager::setRunCommand() |
| 394 | { |
nothing calls this directly
no test coverage detected