added exit and notification on 7z lib not found

This commit is contained in:
Luis Ángel San Martín
2013-11-24 12:55:03 +01:00
parent 92331af971
commit 8255637028
12 changed files with 105 additions and 13 deletions

View File

@ -413,6 +413,8 @@ QList<QVector<quint32> > FileComic::getSections(int & sectionIndex)
void FileComic::process()
{
CompressedArchive archive(_path);
if(!archive.toolsLoaded())
return;
//se filtran para obtener s<>lo los formatos soportados
_order = archive.getFileNames();
_fileNames = filter(_order);

21
common/exit_check.cpp Normal file
View File

@ -0,0 +1,21 @@
#include "exit_check.h"
#include "yacreader_global.h"
#include <QMessageBox>
using namespace YACReader;
void YACReader::exitCheck(int ret)
{
switch(ret)
{
case YACReader::SevenZNotFound:
QMessageBox::critical(0,QObject::tr("7z lib not found"),QObject::tr("unable to load 7z lib from ./utils"));
break;
default:
break;
}
}

9
common/exit_check.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef EXIT_CHECK_H
#define EXIT_CHECK_H
namespace YACReader
{
void exitCheck(int ret);
}
#endif

View File

@ -88,6 +88,11 @@ namespace YACReader
Opened = 2
};
enum YACReaderErrors
{
SevenZNotFound = 700
};
QString getSettingsPath();
}