Refactoring: more mixed indentation and curly braces

This commit is contained in:
Felix Kauselmann 2016-10-17 22:19:28 +02:00
parent 2edfe534bd
commit 99584c3ba7

View File

@ -222,10 +222,13 @@ QList<QString> Comic::findValidComicFiles(const QList<QUrl> &list)
QLOG_DEBUG() << "-findValidComicFiles-";
QList<QString> validComicFiles;
QString currentPath;
foreach (QUrl url, list) {
foreach (QUrl url, list)
{
currentPath = url.toLocalFile();
if(Comic::fileIsComic(currentPath))
{
validComicFiles << currentPath;
}
else if(QFileInfo(currentPath).isDir())
{
validComicFiles << findValidComicFilesInFolder(currentPath);
@ -484,10 +487,14 @@ QList<QVector<quint32> > FileComic::getSections(int & sectionIndex)
foreach(quint32 si,section)
{
if(si<realIdx)
{
section1.append(si);
}
else
{
section2.append(si);
}
}
sectionIndex++;
sections.append(section1);
sections.append(section2);
@ -744,7 +751,9 @@ bool PDFComic::load(const QString & path, const ComicDB & comic)
QList<int> bookmarkIndexes;
bookmarkIndexes << comic.info.bookmark1 << comic.info.bookmark2 << comic.info.bookmark3;
if(bm->load(bookmarkIndexes,comic.info.currentPage-1))
{
emit bookmarksUpdated();
}
_firstPage = comic.info.currentPage-1;
_path = QDir::cleanPath(path);
return true;
@ -1007,11 +1016,15 @@ void get_double_pages(const QList<QString> & pageNames, QList<QString> & singleP
foreach(const QString & pageName, pageNames)
{
if(is_double_page(pageName.split('/').last(), mostCommonPrefix, maxExpectedDoublePagesNumberLenght))
{
doublePageNames.append(pageName);
}
else
{
singlePageNames.append(pageName);
}
}
}
QList<QString> merge_pages(QList<QString> & singlePageNames, QList<QString> & doublePageNames)
{