| 191 | } |
| 192 | |
| 193 | void ItemRepositoryRegistry::registerRepository(AbstractItemRepository* repository) |
| 194 | { |
| 195 | Q_D(ItemRepositoryRegistry); |
| 196 | |
| 197 | QMutexLocker lock(&d->m_mutex); |
| 198 | d->m_repositories.insert(repository); |
| 199 | if (!d->m_path.isEmpty()) { |
| 200 | // Locking the repository is documented as the caller's responsibility. |
| 201 | if (!repository->open(d->m_path)) { |
| 202 | d->deleteDataDirectory(); |
| 203 | qCritical() << "failed to open a repository"; |
| 204 | abort(); |
| 205 | } |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | QString ItemRepositoryRegistry::path() const |
| 210 | { |
no test coverage detected