mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Clazy: Use fixits to refactor some old style signal connections
This commit is contained in:
@ -414,7 +414,7 @@ void Render::render()
|
||||
//si se ha creado un hilo para renderizar la página actual, se arranca
|
||||
if (pageRenders[currentPageBufferedIndex] != 0) {
|
||||
//se conecta la señal pageReady del hilo, con el SLOT prepareAvailablePage
|
||||
connect(pageRenders[currentPageBufferedIndex], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int)));
|
||||
connect(pageRenders[currentPageBufferedIndex], &PageRender::pageReady, this, &Render::prepareAvailablePage);
|
||||
//se emite la señal de procesando, debido a que los hilos se arrancan aquí
|
||||
if (filters.size() > 0)
|
||||
emit processingPage();
|
||||
@ -712,17 +712,17 @@ void Render::createComic(const QString &path)
|
||||
|
||||
connect(comic, SIGNAL(errorOpening()), this, SIGNAL(errorOpening()), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(errorOpening(QString)), this, SIGNAL(errorOpening(QString)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(crcErrorFound(QString)), this, SIGNAL(crcError(QString)), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::crcErrorFound, this, &Render::crcError, Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(errorOpening()), this, SLOT(reset()), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(imageLoaded(int)), this, SLOT(pageRawDataReady(int)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(imageLoaded(int)), this, SIGNAL(imageLoaded(int)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(openAt(int)), this, SLOT(renderAt(int)), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::openAt, this, &Render::renderAt, Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(numPages(unsigned int)), this, SIGNAL(numPages(unsigned int)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(numPages(unsigned int)), this, SLOT(setNumPages(unsigned int)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(imageLoaded(int, QByteArray)), this, SIGNAL(imageLoaded(int, QByteArray)), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(isBookmark(bool)), this, SIGNAL(currentPageIsBookmark(bool)), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::isBookmark, this, &Render::currentPageIsBookmark, Qt::QueuedConnection);
|
||||
|
||||
connect(comic, SIGNAL(bookmarksUpdated()), this, SIGNAL(bookmarksUpdated()), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::bookmarksUpdated, this, &Render::bookmarksUpdated, Qt::QueuedConnection);
|
||||
|
||||
//connect(comic,SIGNAL(isLast()),this,SIGNAL(isLast()));
|
||||
//connect(comic,SIGNAL(isCover()),this,SIGNAL(isCover()));
|
||||
@ -748,11 +748,11 @@ void Render::startLoad()
|
||||
|
||||
connect(comic, SIGNAL(errorOpening()), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(errorOpening(QString)), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(imagesLoaded()), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::imagesLoaded, thread, &QThread::quit, Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||
connect(comic, SIGNAL(invalidated()), thread, SLOT(quit()), Qt::QueuedConnection);
|
||||
connect(comic, &Comic::invalidated, thread, &QThread::quit, Qt::QueuedConnection);
|
||||
connect(thread, SIGNAL(started()), comic, SLOT(process()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||
|
||||
if (thread != nullptr)
|
||||
thread->start();
|
||||
@ -983,7 +983,7 @@ void Render::fillBuffer()
|
||||
pagesReady[currentIndex + i]) //preload next pages
|
||||
{
|
||||
pageRenders[currentPageBufferedIndex + i] = new PageRender(this, currentIndex + i, comic->getRawData()->at(currentIndex + i), buffer[currentPageBufferedIndex + i], imageRotation, filters);
|
||||
connect(pageRenders[currentPageBufferedIndex + i], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int)));
|
||||
connect(pageRenders[currentPageBufferedIndex + i], &PageRender::pageReady, this, &Render::prepareAvailablePage);
|
||||
pageRenders[currentPageBufferedIndex + i]->start();
|
||||
}
|
||||
|
||||
@ -994,7 +994,7 @@ void Render::fillBuffer()
|
||||
pagesReady[currentIndex - i]) //preload previous pages
|
||||
{
|
||||
pageRenders[currentPageBufferedIndex - i] = new PageRender(this, currentIndex - i, comic->getRawData()->at(currentIndex - i), buffer[currentPageBufferedIndex - i], imageRotation, filters);
|
||||
connect(pageRenders[currentPageBufferedIndex - i], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int)));
|
||||
connect(pageRenders[currentPageBufferedIndex - i], &PageRender::pageReady, this, &Render::prepareAvailablePage);
|
||||
pageRenders[currentPageBufferedIndex - i]->start();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user