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

Method updateViewsOnComicUpdateWithId

YACReaderLibrary/library_window.cpp:2670–2691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2668}
2669
2670void LibraryWindow::updateViewsOnComicUpdateWithId(quint64 libraryId, quint64 comicId)
2671{
2672 if (libraryId == (quint64)libraries.getId(selectedLibrary->currentText())) {
2673 auto path = libraries.getPath(libraryId);
2674 if (path.isEmpty()) {
2675 return;
2676 }
2677 QString connectionName = "";
2678 {
2679 QSqlDatabase db = DataBaseManagement::loadDatabase(LibraryPaths::libraryDataPath(path));
2680 bool found;
2681 auto comic = DBHelper::loadComic(comicId, db, found);
2682 if (found) {
2683 updateViewsOnComicUpdate(libraryId, comic);
2684 }
2685
2686 qDebug() << db.lastError();
2687 connectionName = db.connectionName();
2688 }
2689 QSqlDatabase::removeDatabase(connectionName);
2690 }
2691}
2692
2693void LibraryWindow::updateViewsOnComicUpdate(quint64 libraryId, const ComicDB &comic)
2694{

Callers

nothing calls this directly

Calls 4

currentTextMethod · 0.80
getPathMethod · 0.80
isEmptyMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected