Commit f7fbbf76 authored by Stefan Brüns's avatar Stefan Brüns

[EPubGenerator] Reduce nesting level in loop

Summary:
The loop body is skipped when `epub_it_get_curr(it)` is invalid.
Make it more obvious there is no more code executed in this case.

Test Plan: no functional changes

Reviewers: #okular, ngraham

Reviewed By: ngraham

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D20946
parent f0ed6187
......@@ -203,10 +203,13 @@ QTextDocument* Converter::convert( const QString &fileName )
QVector<Okular::SoundAction *> soundActions;
const QSize videoSize(320, 240);
do{
movieAnnots.clear();
soundActions.clear();
if(!epub_it_get_curr(it)) {
continue;
}
movieAnnots.clear();
soundActions.clear();
if(epub_it_get_curr(it)) {
const QString link = QString::fromUtf8(epub_it_get_curr_url(it));
mTextDocument->setCurrentSubDocument(link);
QString htmlContent = QString::fromUtf8(epub_it_get_curr(it));
......@@ -354,7 +357,7 @@ QTextDocument* Converter::convert( const QString &fileName )
while(mTextDocument->pageCount() == page)
_cursor->insertText(QStringLiteral("\n"));
}
} while (epub_it_get_next(it));
epub_free_iterator(it);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment