| 147 | } |
| 148 | |
| 149 | void YACReaderLibraries::addLibrary(const QString &name, const QString &path) |
| 150 | { |
| 151 | int legacyId = 0; |
| 152 | const auto &existingLibraries = libraries; |
| 153 | for (const auto &library : existingLibraries) |
| 154 | legacyId = qMax(legacyId, library.getLegacyId()); |
| 155 | legacyId++; |
| 156 | |
| 157 | auto id = readFromLibraryFolder(path); |
| 158 | |
| 159 | if (id.isNull()) { |
| 160 | id = QUuid::createUuid(); |
| 161 | writeIdToLibraryFolder(path, id); |
| 162 | } |
| 163 | libraries.append(YACReaderLibrary(name, path, legacyId, id)); |
| 164 | } |
| 165 | |
| 166 | void YACReaderLibraries::load() |
| 167 | { |
no test coverage detected