MCPcopy Create free account
hub / github.com/YACReader/yacreader / updateLibrary

Method updateLibrary

YACReaderLibrary/libraries_update_coordinator.cpp:158–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void LibrariesUpdateCoordinator::updateLibrary(const QString &path)
159{
160 QDir pathDir(path);
161 if (!pathDir.exists()) {
162 return;
163 }
164
165 QEventLoop eventLoop;
166 auto libraryCreator = new LibraryCreator(settings);
167 std::shared_ptr<LibraryCreator> sharedPtr(libraryCreator);
168 currentLibraryCreator = sharedPtr;
169
170 QString cleanPath = QDir::cleanPath(pathDir.absolutePath());
171
172 libraryCreator->updateLibrary(cleanPath, LibraryPaths::libraryDataPath(cleanPath));
173
174 connect(libraryCreator, &LibraryCreator::finished, &eventLoop, &QEventLoop::quit);
175
176 libraryCreator->start();
177 eventLoop.exec();
178}
179
180void LibrariesUpdateCoordinator::stop()
181{

Callers

nothing calls this directly

Calls 2

startMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected