mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 17:04:45 -04:00
Merged luisangelsm/yacreader/headless_server into headless_server
This commit is contained in:
@ -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"
|
||||
@ -320,7 +320,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;
|
||||
}
|
||||
@ -487,14 +487,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;
|
||||
}
|
||||
@ -506,7 +506,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;
|
||||
}
|
||||
@ -552,7 +552,7 @@ void FileComic::process()
|
||||
emit imageLoaded(sortedIndex);
|
||||
emit imageLoaded(sortedIndex,_pages[sortedIndex]);
|
||||
}*/
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
moveToThread(QCoreApplication::instance()->thread());
|
||||
emit imagesLoaded();
|
||||
}
|
||||
|
||||
@ -612,7 +612,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
|
||||
@ -646,7 +646,7 @@ void FolderComic::process()
|
||||
count++;
|
||||
}
|
||||
}
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
moveToThread(QCoreApplication::instance()->thread());
|
||||
emit imagesLoaded();
|
||||
}
|
||||
|
||||
@ -689,7 +689,7 @@ bool PDFComic::load(const QString & path, int atPage)
|
||||
}
|
||||
else
|
||||
{
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
moveToThread(QCoreApplication::instance()->thread());
|
||||
emit errorOpening();
|
||||
return false;
|
||||
}
|
||||
@ -712,7 +712,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;
|
||||
}
|
||||
@ -736,13 +736,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;
|
||||
}
|
||||
@ -778,7 +778,7 @@ void PDFComic::process()
|
||||
renderPage(i);
|
||||
|
||||
delete pdfComic;
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
moveToThread(QCoreApplication::instance()->thread());
|
||||
emit imagesLoaded();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user