mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Comic: Virtual prototype for process(), fix signal/slot
This commit is contained in:
parent
8377de7c3e
commit
f813a018d2
@ -751,7 +751,7 @@ void Render::startLoad()
|
|||||||
connect(comic, &Comic::imagesLoaded, thread, &QThread::quit, Qt::QueuedConnection);
|
connect(comic, &Comic::imagesLoaded, thread, &QThread::quit, Qt::QueuedConnection);
|
||||||
connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection);
|
connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||||
connect(comic, &Comic::invalidated, thread, &QThread::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);
|
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||||
|
|
||||||
if (thread != nullptr)
|
if (thread != nullptr)
|
||||||
|
@ -64,7 +64,7 @@ void ComicController::service(HttpRequest &request, HttpResponse &response)
|
|||||||
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
||||||
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
||||||
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::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);
|
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||||
|
|
||||||
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
||||||
|
@ -69,7 +69,7 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
|||||||
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
||||||
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
||||||
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::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);
|
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||||
|
|
||||||
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
||||||
|
@ -56,7 +56,7 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
|
|||||||
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
|
||||||
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
|
||||||
connect(comicFile, &Comic::imagesLoaded, thread, &QThread::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);
|
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||||
|
|
||||||
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
comicFile->load(libraries.getPath(libraryId) + comic.path);
|
||||||
|
@ -92,6 +92,7 @@ public slots:
|
|||||||
void updateBookmarkImage(int);
|
void updateBookmarkImage(int);
|
||||||
void setPageLoaded(int page);
|
void setPageLoaded(int page);
|
||||||
void invalidate();
|
void invalidate();
|
||||||
|
virtual void process() {};
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void invalidated();
|
void invalidated();
|
||||||
|
Loading…
Reference in New Issue
Block a user