* @brief Handles a QProcess-level error during execution. */
| 529 | * @brief Handles a QProcess-level error during execution. |
| 530 | */ |
| 531 | void IO::Drivers::Process::onProcessError(QProcess::ProcessError error) |
| 532 | { |
| 533 | if (error == QProcess::FailedToStart) |
| 534 | return; |
| 535 | |
| 536 | const QString detail = m_process ? m_process->errorString() : tr("Unknown error"); |
| 537 | Misc::Utilities::showMessageBox(tr("Process Error"), detail, QMessageBox::Warning); |
| 538 | |
| 539 | QMetaObject::invokeMethod( |
| 540 | &IO::ConnectionManager::instance(), |
| 541 | [this] { IO::ConnectionManager::instance().disconnectDevice(this); }, |
| 542 | Qt::QueuedConnection); |
| 543 | } |
| 544 | |
| 545 | /** |
| 546 | * @brief Called on the main thread when pipeReadLoop() fails to open the pipe. |
nothing calls this directly
no test coverage detected