* @brief Opens a file dialog to select the named pipe / FIFO path. */
| 409 | * @brief Opens a file dialog to select the named pipe / FIFO path. |
| 410 | */ |
| 411 | void IO::Drivers::Process::browsePipePath() |
| 412 | { |
| 413 | const auto start = m_pipePath.isEmpty() |
| 414 | ? QStandardPaths::writableLocation(QStandardPaths::HomeLocation) |
| 415 | : QFileInfo(m_pipePath).absolutePath(); |
| 416 | |
| 417 | auto* dialog = new QFileDialog(qApp->activeWindow(), tr("Select Named Pipe / FIFO"), start); |
| 418 | |
| 419 | dialog->setFileMode(QFileDialog::ExistingFile); |
| 420 | dialog->setAttribute(Qt::WA_DeleteOnClose); |
| 421 | |
| 422 | connect(dialog, &QFileDialog::fileSelected, this, [this](const QString& path) { |
| 423 | if (path.isEmpty()) |
| 424 | return; |
| 425 | |
| 426 | QMetaObject::invokeMethod(this, [this, path]() { setPipePath(path); }, Qt::QueuedConnection); |
| 427 | }); |
| 428 | |
| 429 | dialog->open(); |
| 430 | } |
| 431 | |
| 432 | /** |
| 433 | * @brief Enumerates running processes and updates the runningProcesses list. |
nothing calls this directly
no test coverage detected