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

Method setComment

kdevplatform/language/duchain/declaration.cpp:184–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void Declaration::setComment(const QByteArray& str)
185{
186 DUCHAIN_D_DYNAMIC(Declaration);
187 if (str.isEmpty()) {
188 d->m_comment = 0;
189 return;
190 }
191
192 const auto request = Repositories::StringRepositoryItemRequest(
193 str.constData(), IndexedString::hashString(str.constData(), str.length()), str.length());
194
195 d->m_comment = LockedItemRepository::write<DeclarationComment>(
196 [&](Repositories::StringRepository& repo) { return repo.index(request); });
197}
198
199void Declaration::setComment(const QString& str)
200{

Callers 1

openDeclarationFunction · 0.45

Calls 5

setCommentFunction · 0.85
isEmptyMethod · 0.45
lengthMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected