| 333 | } |
| 334 | |
| 335 | void QHexView::copy(bool hex) const { |
| 336 | QClipboard* c = qApp->clipboard(); |
| 337 | |
| 338 | QByteArray bytes = m_hexcursor->hasSelection() |
| 339 | ? m_hexcursor->selectedBytes() |
| 340 | : m_hexdocument->read(m_hexcursor->offset(), 1); |
| 341 | |
| 342 | if(hex) |
| 343 | bytes = QHexUtils::toHex(bytes, ' ').toUpper(); |
| 344 | c->setText(bytes); |
| 345 | } |
| 346 | |
| 347 | void QHexView::paste(bool hex) { |
| 348 | if(m_readonly) |
no test coverage detected