| 472 | } |
| 473 | |
| 474 | bool ServerConfigDialog::browseConfigFile() |
| 475 | { |
| 476 | //: %1 is replaced with the application names |
| 477 | //: (*.conf) and (*.*) should not be translated |
| 478 | const auto deskflowConfigFilter = tr("%1 Configurations (*.conf);;All files (*.*)"); |
| 479 | |
| 480 | QString fileName = |
| 481 | QFileDialog::getOpenFileName(this, tr("Browse for a config file"), "", deskflowConfigFilter.arg(kAppName)); |
| 482 | |
| 483 | if (!fileName.isEmpty()) { |
| 484 | ui->lineConfigFile->setText(fileName); |
| 485 | serverConfig().setConfigFile(ui->lineConfigFile->text()); |
| 486 | onChange(); |
| 487 | return true; |
| 488 | } |
| 489 | |
| 490 | return false; |
| 491 | } |
| 492 | |
| 493 | bool ServerConfigDialog::addComputer(const QString &clientName, bool doSilent) |
| 494 | { |
nothing calls this directly
no test coverage detected