mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Revert "Thread ping pong"
This commit is contained in:
committed by
GitHub
parent
b906bf964f
commit
0b83764734
@ -53,21 +53,23 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
Comic *comicFile = FactoryComic::newComic(libraries.getPath(libraryId) + comic.path);
|
||||
|
||||
if (comicFile != NULL) {
|
||||
QThread *thread = new QThread();
|
||||
if (comicFile != nullptr) {
|
||||
QThread *thread = nullptr;
|
||||
|
||||
thread = new QThread();
|
||||
|
||||
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(comicFile, SIGNAL(destroyed()), thread, SLOT(quit()));
|
||||
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()));
|
||||
|
||||
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
||||
|
||||
thread->start();
|
||||
if (thread != nullptr)
|
||||
thread->start();
|
||||
|
||||
if (remoteComic) {
|
||||
QLOG_TRACE() << "remote comic requested";
|
||||
|
Reference in New Issue
Block a user