MCPcopy Create free account
hub / github.com/clementgallet/libTAS / copy

Method copy

src/external/qhexview/src/qhexview.cpp:335–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void 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
347void QHexView::paste(bool hex) {
348 if(m_readonly)

Callers 2

cutMethod · 0.95
keyPressActionMethod · 0.95

Calls 5

toHexFunction · 0.85
hasSelectionMethod · 0.80
selectedBytesMethod · 0.45
readMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected