* @brief Clears the console text and per-device buffer for the current device. */
| 425 | * @brief Clears the console text and per-device buffer for the current device. |
| 426 | */ |
| 427 | void Console::Handler::clear() |
| 428 | { |
| 429 | m_textBuffer.clear(); |
| 430 | m_isStartingLine = true; |
| 431 | m_lastCharWasCR = false; |
| 432 | |
| 433 | auto it = m_deviceState.find(m_currentDeviceId); |
| 434 | if (it != m_deviceState.end()) { |
| 435 | it->second.buffer.clear(); |
| 436 | it->second.isStartingLine = true; |
| 437 | it->second.lastCharWasCR = false; |
| 438 | } |
| 439 | |
| 440 | Q_EMIT cleared(); |
| 441 | } |
| 442 | |
| 443 | /** |
| 444 | * @brief Navigates to an older entry in the command history. |
no test coverage detected