| 182 | } |
| 183 | |
| 184 | void 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 | |
| 199 | void Declaration::setComment(const QString& str) |
| 200 | { |
no test coverage detected