mirror of
https://github.com/YACReader/yacreader
synced 2025-08-05 22:04:59 -04:00
Merged in selmf/yacreader/small-fixes-9.0 (pull request #52)
Small fixes 9.0:
This commit is contained in:
@ -243,6 +243,9 @@ void DBHelper::update(qulonglong libraryId, ComicInfo & comicInfo)
|
||||
|
||||
void DBHelper::update(ComicInfo * comicInfo, QSqlDatabase & db)
|
||||
{
|
||||
if(comicInfo == nullptr)
|
||||
return;
|
||||
|
||||
QSqlQuery updateComicInfo(db);
|
||||
updateComicInfo.prepare("UPDATE comic_info SET "
|
||||
"title = :title,"
|
||||
@ -385,7 +388,7 @@ void DBHelper::updateProgress(qulonglong libraryId, const ComicInfo &comicInfo)
|
||||
comic.info.currentPage = comicInfo.currentPage;
|
||||
comic.info.hasBeenOpened = true;
|
||||
|
||||
DBHelper::update(&comic.info,db);
|
||||
DBHelper::updateReadingRemoteProgress(comic.info,db);
|
||||
|
||||
db.close();
|
||||
QSqlDatabase::removeDatabase(libraryPath);
|
||||
@ -407,6 +410,8 @@ void DBHelper::updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatab
|
||||
updateComicInfo.bindValue(":id", comicInfo.id);
|
||||
updateComicInfo.bindValue(":rating", comicInfo.rating);
|
||||
updateComicInfo.exec();
|
||||
|
||||
updateComicInfo.clear();
|
||||
}
|
||||
|
||||
|
||||
|
@ -244,6 +244,7 @@ void HttpSession::dismissCurrentComic()
|
||||
{
|
||||
if(dataPtr->yacreaderSessionData.comic != 0)
|
||||
{
|
||||
dataPtr->yacreaderSessionData.comic->invalidate();
|
||||
dataPtr->yacreaderSessionData.comic->deleteLater();
|
||||
dataPtr->yacreaderSessionData.comic = 0;
|
||||
}
|
||||
@ -283,6 +284,7 @@ void HttpSession::dismissCurrentRemoteComic()
|
||||
{
|
||||
if(dataPtr->yacreaderSessionData.remoteComic != 0)
|
||||
{
|
||||
dataPtr->yacreaderSessionData.remoteComic->invalidate();
|
||||
dataPtr->yacreaderSessionData.remoteComic->deleteLater();
|
||||
dataPtr->yacreaderSessionData.remoteComic = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user