Implement the new ExtractDelegate method in FileComic,

If the comic has been invalidated the extraction should stop.
This commit is contained in:
Luis Ángel San Martín 2018-01-06 07:52:55 +01:00
parent c766fedd45
commit a516fb1df4
2 changed files with 11 additions and 3 deletions

View File

@ -419,6 +419,11 @@ void FileComic::unknownError(int index)
//emit errorOpening();
}
bool FileComic::isCancelled()
{
return _invalidated;
}
//--------------------------------------
QList<QVector<quint32> > FileComic::getSections(int & sectionIndex)

View File

@ -121,13 +121,16 @@ class FileComic : public Comic, public ExtractDelegate
FileComic();
FileComic(const QString & path, int atPage = -1);
~FileComic();
void fileExtracted(int index, const QByteArray & rawData);
virtual bool load(const QString & path, int atPage = -1);
virtual bool load(const QString & path, const ComicDB & comic);
static QList<QString> filter(const QList<QString> & src);
//ExtractDelegate
void fileExtracted(int index, const QByteArray & rawData);
void crcError(int index);
void unknownError(int index);
static QList<QString> filter(const QList<QString> & src);
bool isCancelled();
public slots:
void process();