MCPcopy Create free account
hub / github.com/KDE/kdevelop / byteArray

Method byteArray

kdevplatform/serialization/indexedstring.cpp:383–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383QByteArray IndexedString::byteArray() const
384{
385 if (!m_index) {
386 return QByteArray();
387 } else if (isSingleCharIndex(m_index)) {
388 return QByteArray(1, indexToChar(m_index));
389 } else {
390 const uint index = m_index;
391 return LockedItemRepository::read<IndexedString>([index](const IndexedStringRepository& repo) {
392 return arrayFromItem(repo.itemFromIndex(index));
393 });
394 }
395}
396
397uint IndexedString::hashString(const char* str, unsigned short length)
398{

Callers 9

testMethod · 0.80
dumpMethod · 0.80
operator()Method · 0.80
visitMethod · 0.80
runMethod · 0.80
ParseSessionDataMethod · 0.80
testMoveIntoSourceMethod · 0.80
ParseSessionMethod · 0.80
findCaseDeclarationsMethod · 0.80

Calls 5

isSingleCharIndexFunction · 0.85
indexToCharFunction · 0.85
arrayFromItemFunction · 0.70
QByteArrayClass · 0.50
itemFromIndexMethod · 0.45

Tested by 4

testMethod · 0.64
visitMethod · 0.64
testMoveIntoSourceMethod · 0.64
findCaseDeclarationsMethod · 0.64