Fix scope

GitKraken has some serious issues when resolving conflicts
This commit is contained in:
Luis Ángel San Martín 2019-09-24 09:17:39 +02:00
parent be547081f2
commit 7ed19ddd78

View File

@ -560,13 +560,14 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
} else {
sections.append(section);
}
}
//out << "se han encontrado : " << sections.count() << " sectionIndex : " << sectionIndex << endl;
return sections;
}
}
void FileComic::process()
{
void FileComic::process()
{
CompressedArchive archive(_path);
if (!archive.toolsLoaded()) {
//moveToThread(QCoreApplication::instance()->thread());
@ -646,29 +647,29 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}*/
//moveToThread(QCoreApplication::instance()->thread());
emit imagesLoaded();
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
FolderComic::FolderComic()
FolderComic::FolderComic()
: Comic()
{
}
{
}
FolderComic::FolderComic(const QString &path, int atPage)
FolderComic::FolderComic(const QString &path, int atPage)
: Comic(path, atPage)
{
{
load(path, atPage);
}
}
FolderComic::~FolderComic()
{
}
FolderComic::~FolderComic()
{
}
bool FolderComic::load(const QString &path, int atPage)
{
bool FolderComic::load(const QString &path, int atPage)
{
_path = path;
if (atPage == -1) {
bm->newComic(_path);
@ -677,10 +678,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
_firstPage = atPage;
//emit bookmarksLoaded(*bm);
return true;
}
}
void FolderComic::process()
{
void FolderComic::process()
{
QDir d(_path);
d.setNameFilters(getSupportedImageFormats());
@ -740,31 +741,31 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}
//moveToThread(QCoreApplication::instance()->thread());
emit imagesLoaded();
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#ifndef NO_PDF
PDFComic::PDFComic()
PDFComic::PDFComic()
: Comic()
{
}
{
}
PDFComic::PDFComic(const QString &path, int atPage)
PDFComic::PDFComic(const QString &path, int atPage)
: Comic(path, atPage)
{
{
load(path, atPage);
}
}
PDFComic::~PDFComic()
{
}
PDFComic::~PDFComic()
{
}
bool PDFComic::load(const QString &path, int atPage)
{
bool PDFComic::load(const QString &path, int atPage)
{
QFileInfo fi(path);
if (fi.exists()) {
@ -781,10 +782,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
emit errorOpening();
return false;
}
}
}
bool PDFComic::load(const QString &path, const ComicDB &comic)
{
bool PDFComic::load(const QString &path, const ComicDB &comic)
{
QFileInfo fi(path);
if (fi.exists()) {
@ -802,10 +803,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
emit errorOpening();
return false;
}
}
}
void PDFComic::process()
{
void PDFComic::process()
{
#if defined Q_OS_MAC && defined USE_PDFKIT
pdfComic = new MacOSXPDFComic();
if (!pdfComic->openComic(_path)) {
@ -883,10 +884,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
delete pdfComic;
//moveToThread(QCoreApplication::instance()->thread());
emit imagesLoaded();
}
}
void PDFComic::renderPage(int page)
{
void PDFComic::renderPage(int page)
{
#if defined Q_OS_MAC && defined USE_PDFKIT
QImage img = pdfComic->getPage(page);
if (!img.isNull()) {
@ -906,12 +907,12 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
emit imageLoaded(page);
emit imageLoaded(page, _pages[page]);
}
}
}
#endif //NO_PDF
Comic *FactoryComic::newComic(const QString &path)
{
Comic *FactoryComic::newComic(const QString &path)
{
QFileInfo fi(path);
if (fi.exists()) {
@ -934,10 +935,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}
} else
return NULL;
}
}
bool is_double_page(const QString &pageName, const QString &commonPrefix, const int maxExpectedDoublePagesNumberLenght)
{
bool is_double_page(const QString &pageName, const QString &commonPrefix, const int maxExpectedDoublePagesNumberLenght)
{
if (pageName.startsWith(commonPrefix)) {
QString substringContainingPageNumbers = pageName.mid(commonPrefix.length());
QString pageNumbersSubString;
@ -959,10 +960,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}
}
return false;
}
}
QString get_most_common_prefix(const QList<QString> &pageNames)
{
QString get_most_common_prefix(const QList<QString> &pageNames)
{
if (pageNames.isEmpty()) {
return "";
}
@ -1023,10 +1024,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}
return common_prefix;
}
}
void get_double_pages(const QList<QString> &pageNames, QList<QString> &singlePageNames /*out*/, QList<QString> &doublePageNames /*out*/)
{
void get_double_pages(const QList<QString> &pageNames, QList<QString> &singlePageNames /*out*/, QList<QString> &doublePageNames /*out*/)
{
uint maxExpectedDoublePagesNumberLenght = (int)(log10(pageNames.length()) + 1) * 2;
QString mostCommonPrefix = get_most_common_prefix(pageNames);
@ -1038,10 +1039,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
singlePageNames.append(pageName);
}
}
}
}
QList<QString> merge_pages(QList<QString> & singlePageNames, QList<QString> & doublePageNames)
{
QList<QString> merge_pages(QList<QString> &singlePageNames, QList<QString> &doublePageNames)
{
//NOTE: this implementation doesn't differ from std::merge using a custom comparator, but it can be easily tweaked if merging requeries an additional heuristic behaviour
QList<QString> pageNames;
@ -1065,10 +1066,10 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
}
return pageNames;
}
}
void comic_pages_sort(QList<QString> & pageNames, YACReaderPageSortingMode sortingMode)
{
void comic_pages_sort(QList<QString> &pageNames, YACReaderPageSortingMode sortingMode)
{
switch (sortingMode) {
case YACReaderNumericalSorting:
std::sort(pageNames.begin(), pageNames.end(), naturalSortLessThanCI);
@ -1091,4 +1092,4 @@ QList<QVector<quint32>> FileComic::getSections(int &sectionIndex)
std::sort(pageNames.begin(), pageNames.end());
break;
}
}
}