|
|
|
@ -6,7 +6,7 @@
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
#include <QFileInfoList>
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
|
|
|
|
|
#include "bookmarks.h" //TODO desacoplar la dependencia con bookmarks
|
|
|
|
|
#include "qnaturalsorting.h"
|
|
|
|
@ -309,7 +309,7 @@ bool FileComic::load(const QString & path, const ComicDB & comic)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//QMessageBox::critical(NULL,tr("Not found"),tr("Comic not found")+" : " + path);
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -476,14 +476,14 @@ void FileComic::process()
|
|
|
|
|
CompressedArchive archive(_path);
|
|
|
|
|
if(!archive.toolsLoaded())
|
|
|
|
|
{
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening(tr("7z not found"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!archive.isValid())
|
|
|
|
|
{
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening(tr("Format not supported"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -495,7 +495,7 @@ void FileComic::process()
|
|
|
|
|
if(_fileNames.size()==0)
|
|
|
|
|
{
|
|
|
|
|
//QMessageBox::critical(NULL,tr("File error"),tr("File not found or not images in file"));
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -539,7 +539,7 @@ void FileComic::process()
|
|
|
|
|
emit imageLoaded(sortedIndex);
|
|
|
|
|
emit imageLoaded(sortedIndex,_pages[sortedIndex]);
|
|
|
|
|
}*/
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit imagesLoaded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -598,7 +598,7 @@ void FolderComic::process()
|
|
|
|
|
{
|
|
|
|
|
//TODO emitir este mensaje en otro sitio
|
|
|
|
|
//QMessageBox::critical(NULL,QObject::tr("No images found"),QObject::tr("There are not images on the selected folder"));
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -632,7 +632,7 @@ void FolderComic::process()
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit imagesLoaded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -675,7 +675,7 @@ bool PDFComic::load(const QString & path, int atPage)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -698,7 +698,7 @@ bool PDFComic::load(const QString & path, const ComicDB & comic)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//QMessageBox::critical(NULL,tr("Not found"),tr("Comic not found")+" : " + path);
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -722,13 +722,13 @@ void PDFComic::process()
|
|
|
|
|
{
|
|
|
|
|
//delete pdfComic;
|
|
|
|
|
//pdfComic = 0;
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (pdfComic->isLocked())
|
|
|
|
|
{
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit errorOpening();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -764,7 +764,7 @@ void PDFComic::process()
|
|
|
|
|
renderPage(i);
|
|
|
|
|
|
|
|
|
|
delete pdfComic;
|
|
|
|
|
moveToThread(QApplication::instance()->thread());
|
|
|
|
|
moveToThread(QCoreApplication::instance()->thread());
|
|
|
|
|
emit imagesLoaded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|