Comic: Virtual prototype for process(), fix signal/slot

This commit is contained in:
Felix Kauselmann 2021-06-03 14:20:32 +02:00
parent 8377de7c3e
commit f813a018d2
5 changed files with 5 additions and 4 deletions

View File

@ -751,7 +751,7 @@ void Render::startLoad()
connect(comic, &Comic::imagesLoaded, thread, &QThread::quit, Qt::QueuedConnection);
connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection);
connect(comic, &Comic::invalidated, thread, &QThread::quit, Qt::QueuedConnection);
connect(thread, SIGNAL(started()), comic, SLOT(process()));
connect(thread, &QThread::started, comic, &Comic::process);
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
if (thread != nullptr)

View File

@ -64,7 +64,7 @@ void ComicController::service(HttpRequest &request, HttpResponse &response)
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, &QThread::started, comicFile, &Comic::process);
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -69,7 +69,7 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, &QThread::started, comicFile, &Comic::process);
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -56,7 +56,7 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, &QThread::started, comicFile, &Comic::process);
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -92,6 +92,7 @@ public slots:
void updateBookmarkImage(int);
void setPageLoaded(int page);
void invalidate();
virtual void process() {};
signals:
void invalidated();