mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 00:44:59 -04:00
Refactoring: more mixed indentation and curly braces
This commit is contained in:
@ -222,10 +222,13 @@ QList<QString> Comic::findValidComicFiles(const QList<QUrl> &list)
|
|||||||
QLOG_DEBUG() << "-findValidComicFiles-";
|
QLOG_DEBUG() << "-findValidComicFiles-";
|
||||||
QList<QString> validComicFiles;
|
QList<QString> validComicFiles;
|
||||||
QString currentPath;
|
QString currentPath;
|
||||||
foreach (QUrl url, list) {
|
foreach (QUrl url, list)
|
||||||
|
{
|
||||||
currentPath = url.toLocalFile();
|
currentPath = url.toLocalFile();
|
||||||
if(Comic::fileIsComic(currentPath))
|
if(Comic::fileIsComic(currentPath))
|
||||||
|
{
|
||||||
validComicFiles << currentPath;
|
validComicFiles << currentPath;
|
||||||
|
}
|
||||||
else if(QFileInfo(currentPath).isDir())
|
else if(QFileInfo(currentPath).isDir())
|
||||||
{
|
{
|
||||||
validComicFiles << findValidComicFilesInFolder(currentPath);
|
validComicFiles << findValidComicFilesInFolder(currentPath);
|
||||||
@ -484,10 +487,14 @@ QList<QVector<quint32> > FileComic::getSections(int & sectionIndex)
|
|||||||
foreach(quint32 si,section)
|
foreach(quint32 si,section)
|
||||||
{
|
{
|
||||||
if(si<realIdx)
|
if(si<realIdx)
|
||||||
|
{
|
||||||
section1.append(si);
|
section1.append(si);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
section2.append(si);
|
section2.append(si);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sectionIndex++;
|
sectionIndex++;
|
||||||
sections.append(section1);
|
sections.append(section1);
|
||||||
sections.append(section2);
|
sections.append(section2);
|
||||||
@ -744,7 +751,9 @@ bool PDFComic::load(const QString & path, const ComicDB & comic)
|
|||||||
QList<int> bookmarkIndexes;
|
QList<int> bookmarkIndexes;
|
||||||
bookmarkIndexes << comic.info.bookmark1 << comic.info.bookmark2 << comic.info.bookmark3;
|
bookmarkIndexes << comic.info.bookmark1 << comic.info.bookmark2 << comic.info.bookmark3;
|
||||||
if(bm->load(bookmarkIndexes,comic.info.currentPage-1))
|
if(bm->load(bookmarkIndexes,comic.info.currentPage-1))
|
||||||
|
{
|
||||||
emit bookmarksUpdated();
|
emit bookmarksUpdated();
|
||||||
|
}
|
||||||
_firstPage = comic.info.currentPage-1;
|
_firstPage = comic.info.currentPage-1;
|
||||||
_path = QDir::cleanPath(path);
|
_path = QDir::cleanPath(path);
|
||||||
return true;
|
return true;
|
||||||
@ -1007,10 +1016,14 @@ void get_double_pages(const QList<QString> & pageNames, QList<QString> & singleP
|
|||||||
foreach(const QString & pageName, pageNames)
|
foreach(const QString & pageName, pageNames)
|
||||||
{
|
{
|
||||||
if(is_double_page(pageName.split('/').last(), mostCommonPrefix, maxExpectedDoublePagesNumberLenght))
|
if(is_double_page(pageName.split('/').last(), mostCommonPrefix, maxExpectedDoublePagesNumberLenght))
|
||||||
|
{
|
||||||
doublePageNames.append(pageName);
|
doublePageNames.append(pageName);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
singlePageNames.append(pageName);
|
singlePageNames.append(pageName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QString> merge_pages(QList<QString> & singlePageNames, QList<QString> & doublePageNames)
|
QList<QString> merge_pages(QList<QString> & singlePageNames, QList<QString> & doublePageNames)
|
||||||
|
Reference in New Issue
Block a user