* @brief Handles a fatal read error by closing the device on the main thread. */
| 564 | * @brief Handles a fatal read error by closing the device on the main thread. |
| 565 | */ |
| 566 | void IO::Drivers::USB::onReadError() |
| 567 | { |
| 568 | if (!isOpen()) |
| 569 | return; |
| 570 | |
| 571 | ConnectionManager::instance().disconnectDevice(this); |
| 572 | Misc::Utilities::showMessageBox(tr("USB Device Error"), |
| 573 | tr("The USB device was disconnected or " |
| 574 | "encountered a fatal read error.")); |
| 575 | } |
| 576 | |
| 577 | /** |
| 578 | * @brief Scans the USB bus and rebuilds the device list. |
nothing calls this directly
no test coverage detected