mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed threads leak when a comic is loaded: YACReader(render) and YACReaderLibrary(comiccontroller)
This commit is contained in:
parent
e05d2e2a99
commit
7f091a666d
@ -814,6 +814,9 @@ void Render::startLoad()
|
||||
|
||||
comic->moveToThread(thread);
|
||||
|
||||
connect(comic, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
||||
connect(comic, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
||||
connect(comic, SIGNAL(imagesLoaded()), thread, SLOT(quit()));
|
||||
connect(thread, SIGNAL(started()), comic, SLOT(process()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
|
@ -56,6 +56,9 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
|
||||
comicFile->moveToThread(thread);
|
||||
|
||||
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
||||
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
||||
connect(comicFile, SIGNAL(imagesLoaded()), thread, SLOT(quit()));
|
||||
connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
|
@ -533,7 +533,6 @@ void FileComic::process()
|
||||
}*/
|
||||
|
||||
emit imagesLoaded();
|
||||
//moveToThread(QApplication::instance()->thread());
|
||||
}
|
||||
|
||||
|
||||
@ -622,7 +621,6 @@ void FolderComic::process()
|
||||
}
|
||||
}
|
||||
emit imagesLoaded();
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -746,7 +744,6 @@ void PDFComic::process()
|
||||
|
||||
delete pdfComic;
|
||||
emit imagesLoaded();
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
}
|
||||
|
||||
void PDFComic::renderPage(int page)
|
||||
|
Loading…
x
Reference in New Issue
Block a user