| 273 | } |
| 274 | |
| 275 | void HexWidget::undo() { |
| 276 | if (!m_stack.isEmpty()) { |
| 277 | stack_entry_t entry = m_stack.pop(); |
| 278 | int address = entry.addr / 2; |
| 279 | int len = entry.ba.size(); |
| 280 | m_data.replace(address, len, entry.ba); |
| 281 | for (int i = address; i < address + len; i++) { |
| 282 | m_modified[i] = m_modified[i] - 1; |
| 283 | } |
| 284 | setCursorOffset(entry.addr); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | void HexWidget::overwrite(int addr, char c) { |
| 289 | int address = addr / 2; |
nothing calls this directly
no outgoing calls
no test coverage detected