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()),this,SIGNAL(errorOpening()));
|
||||||
connect(comic,SIGNAL(errorOpening(QString)),this,SIGNAL(errorOpening(QString)));
|
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(errorOpening()),this,SLOT(reset()));
|
||||||
connect(comic,SIGNAL(imageLoaded(int)),this,SIGNAL(imageLoaded(int)));
|
connect(comic,SIGNAL(imageLoaded(int)),this,SIGNAL(imageLoaded(int)));
|
||||||
connect(comic,SIGNAL(imageLoaded(int)),this,SLOT(pageRawDataReady(int)));
|
connect(comic,SIGNAL(imageLoaded(int)),this,SLOT(pageRawDataReady(int)));
|
||||||
|
@ -171,6 +171,7 @@ signals:
|
|||||||
void numPages(unsigned int numPages);
|
void numPages(unsigned int numPages);
|
||||||
void errorOpening();
|
void errorOpening();
|
||||||
void errorOpening(QString);
|
void errorOpening(QString);
|
||||||
|
void crcError(QString);
|
||||||
void currentPageIsBookmark(bool);
|
void currentPageIsBookmark(bool);
|
||||||
void isLast();
|
void isLast();
|
||||||
void isCover();
|
void isCover();
|
||||||
|
@ -159,6 +159,7 @@ void Viewer::createConnections()
|
|||||||
connect(render,SIGNAL(errorOpening()),this,SLOT(resetContent()));
|
connect(render,SIGNAL(errorOpening()),this,SLOT(resetContent()));
|
||||||
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
|
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
|
||||||
connect(render,SIGNAL(errorOpening(QString)),this,SLOT(showMessageErrorOpening(QString)));
|
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)),goToFlow,SLOT(setNumSlides(unsigned int)));
|
||||||
connect(render,SIGNAL(numPages(unsigned int)),goToDialog,SLOT(setNumPages(unsigned int)));
|
connect(render,SIGNAL(numPages(unsigned int)),goToDialog,SLOT(setNumPages(unsigned int)));
|
||||||
//connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
|
//connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
|
||||||
@ -214,7 +215,7 @@ void Viewer::open(QString pathFile, const ComicDB & comic)
|
|||||||
void Viewer::showMessageErrorOpening()
|
void Viewer::showMessageErrorOpening()
|
||||||
{
|
{
|
||||||
QMessageBox::critical(this,tr("Not found"),tr("Comic not found"));
|
QMessageBox::critical(this,tr("Not found"),tr("Comic not found"));
|
||||||
resetContent();
|
//resetContent(); --> not needed
|
||||||
}
|
}
|
||||||
|
|
||||||
void Viewer::showMessageErrorOpening(QString message)
|
void Viewer::showMessageErrorOpening(QString message)
|
||||||
@ -223,6 +224,11 @@ void Viewer::showMessageErrorOpening(QString message)
|
|||||||
resetContent();
|
resetContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Viewer::processCRCError(QString message)
|
||||||
|
{
|
||||||
|
QMessageBox::critical(this,tr("CRC Error"),message);
|
||||||
|
}
|
||||||
|
|
||||||
void Viewer::next()
|
void Viewer::next()
|
||||||
{
|
{
|
||||||
direction = 1;
|
direction = 1;
|
||||||
|
@ -81,6 +81,7 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
|
|||||||
void updateConfig(QSettings * settings);
|
void updateConfig(QSettings * settings);
|
||||||
void showMessageErrorOpening();
|
void showMessageErrorOpening();
|
||||||
void showMessageErrorOpening(QString);
|
void showMessageErrorOpening(QString);
|
||||||
|
void processCRCError(QString message);
|
||||||
void setBookmarks();
|
void setBookmarks();
|
||||||
//deprecated
|
//deprecated
|
||||||
void updateImageOptions();
|
void updateImageOptions();
|
||||||
|
@ -299,7 +299,7 @@ void FileComic::fileExtracted(int index, const QByteArray & rawData)
|
|||||||
|
|
||||||
void FileComic::crcError(int index)
|
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
|
//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 numPages(unsigned int numPages);
|
||||||
void errorOpening();
|
void errorOpening();
|
||||||
void errorOpening(QString);
|
void errorOpening(QString);
|
||||||
|
void crcErrorFound(QString);
|
||||||
void isBookmark(bool);
|
void isBookmark(bool);
|
||||||
void bookmarksUpdated();
|
void bookmarksUpdated();
|
||||||
void isCover();
|
void isCover();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user