mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Changed CRC errors management.
This commit is contained in:
parent
7e69e94b82
commit
d075b111ee
@ -663,6 +663,7 @@ void Render::createComic(const QString & path)
|
||||
|
||||
connect(comic,SIGNAL(errorOpening()),this,SIGNAL(errorOpening()));
|
||||
connect(comic,SIGNAL(errorOpening(QString)),this,SIGNAL(errorOpening(QString)));
|
||||
connect(comic,SIGNAL(crcErrorFound(QString)),this,SIGNAL(crcError(QString)));
|
||||
connect(comic,SIGNAL(errorOpening()),this,SLOT(reset()));
|
||||
connect(comic,SIGNAL(imageLoaded(int)),this,SIGNAL(imageLoaded(int)));
|
||||
connect(comic,SIGNAL(imageLoaded(int)),this,SLOT(pageRawDataReady(int)));
|
||||
|
@ -171,6 +171,7 @@ signals:
|
||||
void numPages(unsigned int numPages);
|
||||
void errorOpening();
|
||||
void errorOpening(QString);
|
||||
void crcError(QString);
|
||||
void currentPageIsBookmark(bool);
|
||||
void isLast();
|
||||
void isCover();
|
||||
|
@ -159,6 +159,7 @@ void Viewer::createConnections()
|
||||
connect(render,SIGNAL(errorOpening()),this,SLOT(resetContent()));
|
||||
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
|
||||
connect(render,SIGNAL(errorOpening(QString)),this,SLOT(showMessageErrorOpening(QString)));
|
||||
connect(render,SIGNAL(crcError(QString)),this,SLOT(processCRCError(QString)));
|
||||
connect(render,SIGNAL(numPages(unsigned int)),goToFlow,SLOT(setNumSlides(unsigned int)));
|
||||
connect(render,SIGNAL(numPages(unsigned int)),goToDialog,SLOT(setNumPages(unsigned int)));
|
||||
//connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
|
||||
@ -214,13 +215,18 @@ void Viewer::open(QString pathFile, const ComicDB & comic)
|
||||
void Viewer::showMessageErrorOpening()
|
||||
{
|
||||
QMessageBox::critical(this,tr("Not found"),tr("Comic not found"));
|
||||
resetContent();
|
||||
//resetContent(); --> not needed
|
||||
}
|
||||
|
||||
void Viewer::showMessageErrorOpening(QString message)
|
||||
{
|
||||
QMessageBox::critical(this,tr("Error opening comic"),message);
|
||||
resetContent();
|
||||
resetContent();
|
||||
}
|
||||
|
||||
void Viewer::processCRCError(QString message)
|
||||
{
|
||||
QMessageBox::critical(this,tr("CRC Error"),message);
|
||||
}
|
||||
|
||||
void Viewer::next()
|
||||
|
@ -81,6 +81,7 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
|
||||
void updateConfig(QSettings * settings);
|
||||
void showMessageErrorOpening();
|
||||
void showMessageErrorOpening(QString);
|
||||
void processCRCError(QString message);
|
||||
void setBookmarks();
|
||||
//deprecated
|
||||
void updateImageOptions();
|
||||
|
@ -299,7 +299,7 @@ void FileComic::fileExtracted(int index, const QByteArray & rawData)
|
||||
|
||||
void FileComic::crcError(int index)
|
||||
{
|
||||
emit errorOpening(tr("CRC error on page (%1): some of the pages will not be displayed correctly").arg(index));
|
||||
emit crcErrorFound(tr("CRC error on page (%1): some of the pages will not be displayed correctly").arg(index+1));
|
||||
}
|
||||
|
||||
//TODO: comprobar que si se produce uno de estos errores, la carga del cómic es irrecuperable
|
||||
|
@ -90,6 +90,7 @@ class ComicDB;
|
||||
void numPages(unsigned int numPages);
|
||||
void errorOpening();
|
||||
void errorOpening(QString);
|
||||
void crcErrorFound(QString);
|
||||
void isBookmark(bool);
|
||||
void bookmarksUpdated();
|
||||
void isCover();
|
||||
|
Loading…
x
Reference in New Issue
Block a user