mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Refactoring: more mixed indentation and curly braces
This commit is contained in:
parent
2edfe534bd
commit
99584c3ba7
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user