| 2668 | } |
| 2669 | |
| 2670 | void 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 | |
| 2693 | void LibraryWindow::updateViewsOnComicUpdate(quint64 libraryId, const ComicDB &comic) |
| 2694 | { |
nothing calls this directly
no test coverage detected